[mysql] # CLIENT # port = 3306 socket = /var/lib/mysql/mysql.sock [mysqld] # GENERAL # user = mysql datadir = /var/lib/mysql socket = /var/lib/mysql/mysql.sock default-storage-engine = InnoDB pid-file = /var/run/mysqld/mysqld.pid sql_mode = "NO_ENGINE_SUBSTITUTION" tmpdir = /var/lib/mysql skip_name_resolve = "ON" default-time-zone = '-05:00' # MyISAM # key-buffer-size = 32M # LOGGING # log-error = /var/log/mysql/mysql-error.log #log-queries-not-using-indexes = 1 long_query_time = 60 slow-query-log = 1 slow-query-log-file = /var/log/mysql/mysql-slow.log # CACHES AND LIMITS tmp_table_size = 32M max_heap_table_size = 32M query_cache_type = 0 # disable DB QUery caching query_cache_size = 0 # disable DB Query caching max_connections = 4000 #i saw 10,000 from PROD i dont' think we'll reach this number.... We'll start with an initial 4000 and watch the processlist for the first 2 weeks max_allowed_packet = 1073741824 thread_cache_size = 50 open-files-limit = 65535 table-definition-cache = 4096 table_open_cache = 10240 # INNODB # innodb_lock_wait_timeout = 28800 innodb-flush-method = O_DIRECT innodb-log-files-in-group = 2 innodb-file-per-table = 1 innodb-buffer-pool-size = 54G innodb_write_io_threads = 8 # Number of I/O threads for writes innodb_read_io_threads = 8 # Number of I/O threads for reads innodb-log-file-size = 1024M innodb_buffer_pool_instances = 8 sort_buffer_size = 6291456 # 6M innodb-flush-log-at-trx-commit = 2 # https://dba.stackexchange.com/questions/12611/is-it-safe-to-use-innodb-flush-log-at-trx-commit-2 ## Replication server-id = 2 log_bin = /var/log/mysql/mysql-bin.log log-bin-index = /var/log/mysql/mysql-bin.index binlog_format = ROW max_binlog_size = 104857600 # 100MB sync_binlog = 1 expire_logs_days = 3 # binary logs will be auto-clean ever 7 days # group replication enforce_gtid_consistency = 1 gtid_mode = "ON" binlog_checksum = NONE log_slave_updates = ON master_info_repository = TABLE relay_log_info_repository = TABLE transaction_write_set_extraction= "XXHASH64" binlog_checksum = NONE auto_increment_increment = 1 auto_increment_offset = 2 group_replication_allow_local_disjoint_gtids_join = OFF group_replication_allow_local_lower_version_join = OFF group_replication_auto_increment_increment = 7 group_replication_bootstrap_group = OFF group_replication_components_stop_timeout = 31536000 group_replication_compression_threshold = 1000000 group_replication_enforce_update_everywhere_checks = OFF group_replication_exit_state_action = READ_ONLY group_replication_flow_control_applier_threshold = 25000 group_replication_flow_control_certifier_threshold = 25000 group_replication_flow_control_mode = QUOTA group_replication_force_members = group_replication_group_name = 3b5805d4-9568-11e9-aafa-024efbd107a8 group_replication_group_seeds = ip-172-31-15-216:33061,ip-172-31-0-104:33061 group_replication_gtid_assignment_block_size = 1000000 group_replication_ip_whitelist = AUTOMATIC group_replication_local_address = ip-172-31-3-188:33061 group_replication_member_weight = 50 group_replication_poll_spin_loops = 0 group_replication_recovery_complete_at = TRANSACTIONS_APPLIED group_replication_recovery_reconnect_interval = 60 group_replication_recovery_retry_count = 10 group_replication_recovery_ssl_ca = group_replication_recovery_ssl_capath = group_replication_recovery_ssl_cert = group_replication_recovery_ssl_cipher = group_replication_recovery_ssl_crl = group_replication_recovery_ssl_crlpath = group_replication_recovery_ssl_key = group_replication_recovery_ssl_verify_server_cert = OFF group_replication_recovery_use_ssl = ON group_replication_single_primary_mode = ON group_replication_ssl_mode = REQUIRED group_replication_start_on_boot = ON group_replication_transaction_size_limit = 0 group_replication_unreachable_majority_timeout = 0