The document summarizes the configuration system architecture at Zing Me.
1. The system was designed to manage configurations across their 700+ servers running over 100 services like ZiDB, Memcached, MySQL and Cassandra.
2. It uses a central ServicesMap module written in C++ to store and synchronize configurations across modules and applications written in different languages like C++, Java and PHP.
3. The ServicesMap provides high performance of over 180K reads per second and agents monitor configurations to detect changes and update applications in real-time using shared memory segments.
11. - Written in C++ - Agent is scheduled to read only changed config from ServicesMap - SHM ConfSet is on Shared Memory - SHM ConfSet contains double buffer to store both old & new conf Agent & SHM ConfSet
12. ConfSet Extension - Written in C & C++ - Provide APIs for PHP app to access SHM ConfSet
13. APC? - Access APC from PHP: 120K reads per second - Access SHM ConfSet using ConfSet Extension from PHP: 250K reads per second - So hard to build my own module to access APC - APC can be accessed from any PHP application
14. PHP to ServicesMap? - Direct access through a TCP connection: <10K reads per second - ServicesMap is dead, nothing can works - Network is slow, anything can works?
15. Agents Monitoring - ServicesMap manages all agents - Each agent in ServicesMap has 2 state Active or Dead - Each agent in ServicesMap has a last sync time field, and an expiration time duration - ServicesMap exposes APIs for Admin module getting all agents and states
16. Q & A Contact: Nguyễn Quang Nam [email_address] http://me.zing.vn/nam.nq