650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/8A/FD/wKiom1hAJhOgTpR5AADWGjcCf94383.png "title=" 36020161201212922886.png "alt=" Wkiom1hajhogtpr5aadwgjccf94383.png "/>
MySQL master, copy from : When the data "Insert,update,delete" is manipulated to the primary server, the same data is automatically copied to the slave server, that is, a mirror from the primary server is always consistent with the data on the primary server
Program to implement read, write separation: The program when writing data to write to the master server, when reading data from the server read.
Load Balancing : Forward the user's request to the backend server "average allocation: Polling"
Hardware: Good performance, stable, expensive
Software: Performance is OK, stability is also OK, free
LVS: "Already integrated into the linux2.6 and core" work layer 4, all servers can be used for load balancing
Haproxy: Working on the 4 floor
Nginx: Working on Layer 7, can only do load balancing of HTTP protocol
in Load Balancing is there a missing problem in the session on the program? How to solve?
Effect: After successful login, refresh the display login, and then refresh and not log in, and then refresh and log in. Login for a while not logged in!
Workaround: Session Sharing: Session storage or Session storage Memcache.
Reverse Proxy : When the user requests the data, the reverse proxy first in the local find there is no cache page, if there is a direct return, if not on the back-end server to request data, after the request is cached locally, the next time directly with this cache. "Cache time and pages to be cached are configurable"
Penetration: Some pages in the site cannot cache "Shopping cart, search page, etc.", then can be configured to penetrate the behavior of direct access to the backend does not cache these pages.
Software:
Squid: Cache to hard disk
CDN: Content distribution Network : Data nodes are built around the world, and users access the site from the node closest to him, so the fastest! only for static content.
Recommendation: Do not build yourself, because the server node too much maintenance costs. You can use a third-party.
This article from "Darren Something" blog, reproduced please contact the author!
High concurrency cluster design experience and related terminology