I like a dump that does not freeze my apps while it runs. With MySQL or MariaDB that is one flag away.
mysqldump --single-transaction --routines --events mydb | gzip > mydb.sql.gz
--single-transaction opens one repeatable-read transaction, so every InnoDB table is dumped as it looked at the start, and writers are not blocked. --routines and --events add stored procedures, functions and scheduled events, which a plain dump leaves out (triggers are already included by default).
The snapshot is only consistent for InnoDB. MyISAM tables are not covered, so a database that still has some of those needs --lock-tables or a short maintenance window.
Further reading: MySQL Reference Manual: mysqldump