Mysql--atlas use

Source: Internet
Author: User

Configuration:

Centos 6.6 Minimal

cpu:e5-2620 x 2

mem:64g

disk:1t

The kernel configuration is as follows:

[[Email protected] ~]# sysctl -pnet.ipv4.ip_forward = 0net.ipv4.conf.default.rp_ filter = 1net.ipv4.conf.default.accept_source_route = 0kernel.sysrq =  0kernel.core_uses_pid = 1net.ipv4.tcp_syncookies = 1net.ipv4.tcp_fin_timeout =  50net.ipv4.tcp_keepalive_time = 1200net.ipv4.tcp_mem = 94500000 915000000  927000000net.ipv4.tcp_tw_reuse = 1net.ipv4.tcp_timestamps = 0net.ipv4.tcp_syn_retries  = 1net.ipv4.tcp_tw_recycle = 1net.core.rmem_max = 16777216net.core.wmem_max  = 16777216net.core.netdev_max_backlog = 262144net.core.somaxconn =  262144net.ipv4.tcp_max_orphans = 3276800net.ipv4.tcp_max_syn_backlog = 262144net.core.wmem _default = 8388608net.core.rmem_default = 8388608net.bridge.bridge-nf-call-ip6tables  = 0net.bridge.bridge-nf-call-iptables = 0net.bridge.bridge-nf-call-arptables = 0kernel.msgmnb = 65536kernel.msgmax =  65536kernel.shmmax = 68719476736kernel.shmall = 4294967296net.ipv4.tcp_synack_ retries = 3net.ipv4.ip_local_port_range = 1024 65000net.ipv4.tcp_rmem =  4096 4096 16777216net.ipv4.tcp_wmem = 4096 4096 16777216fs.file-max =  65535[[email protected] ~]#


Atlas Installation path:/usr/local/mysql-proxy

The Atlas configuration is as follows:

[Mysql-proxy] #带 # for non-required configuration item # The user name of the management interface admin-username = admin# the password of the management interface admin-password = admin# The IP and port of the MySQL master library connected to the Atlas backend can be set up with multiple entries, separated by commas Proxy-backend-addresses = 10.10.10.1:3306#atlas back-end connected MySQL from the library IP and port , the number at the end of the @ represents the weight, used for load balancing, and if omitted the default is 1, you can set multiple items, separated by commas proxy-read-only-backend-addresses = 10.10.10.2:[email  Protected],10.10.10.3:[email protected] #主库: 10.10.10.1# from the library:10.10.10.2 , 10.10.10.3# user name and its corresponding encrypted MySQL password, Password using Prefix/bin directory encryption program encrypt encryption, downlink user1 and User2 For example, replace it with your MySQL username and encryption password! pwds = root:cmztq3daq-vu3z0j1zbymq== #设置Atlas的运行方式, set to True when the daemon mode, set to False as the foreground mode, general development debugging set to False, There must be no spaces after the line run time set to True,true. daemon = true# set how Atlas runs, set to True when Atlas starts two processes, one for monitor, and one for worker,monitor automatically restarts the worker after it exits unexpectedly. Set to False when only the worker, no monitor, general development debugging is set to False, the line run time set to true,true cannot have space after. keepalive = true# number of worker threads, has a great impact on the performance of Atlas, the event-threads = 48# log level can be set appropriately according to the situation, divided into message, warning, Critical, error, debug five levels log-level = message  #日志存放的路径log-path = /usr/local/mysql-proxy/log#sql log switch, can be set to off, on, realtime,off means not logging SQL log, on means logging SQL log, Realtime represents the logging of SQL logs and writes to disk in real time, and defaults to off#sql-log = on# slow log output settings. When this parameter is set, the log only outputs log records with a execution time exceeding sql-log-slow (in ms). If you do not set this parameter, all logs are output. #sql-log-slow = 10000# Instance name for the distinction between multiple Atlas instances on the same machine #instance = test# The management interface IP and port proxy-address = 10.10.10.254#atlas monitoring for the work interface IP and port of the Atlas listener admin-address =  127.0.0.1:2345# table settings, in this case, the person is the library name, MT is the table name, the ID is a sub-table field, 3 is the number of child tables, you can set a number of items, separated by commas, if the table does not need to set the item #tables =  person.mt.id.3# The default character set, the client no longer needs to execute the Set names statement after setting the item #charset = utf8# allow the IP of the client connecting to Atlas, either an exact IP or an IP segment, Separated by commas, if you do not set this entry, all IP connections are allowed, otherwise only IP connections in the list are allowed to #client-ips = 127.0.0.1,  #Atlas前面挂接的LVS的物理网卡的IP (note that it is not a virtual IP). If there is LVS and set client-ips, this must be set, otherwise you can not set #lvs-ips =


There are many tutorials on the network for the configuration of the kernel and atlas. There's no mention here.

Ulimit changes are necessary, otherwise you will be prompted when you open and connect.

Some of the points for Atlas include:

1, stored procedure if with insert and update occasionally sent to from the library

2, Thread reset (this is the 360 official did not do the processing, in fact, does not affect the use of)

3, it is best to close selinux.

4, Linux server security software restrictions, resulting in Atlas concurrency to a certain number of forced termination or reset caused errors! (if not necessary, do not install Linux security software)


Above, about the thread reset is about concurrency, the Server Core, Ulimit is not configured to have a certain relationship, we refer to their own computer performance to give the corresponding configuration can ~

If there are errors, please point out!

Mysql--atlas use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.