Your SlideShare is downloading. ×
  • Like
Php day 2011 - Zing me configuration system arch
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Php day 2011 - Zing me configuration system arch

  • 1,138 views
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,138
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
17
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Zing Me Configuration System Architecture Nguyen Quang Nam Zing Me Team
  • 2. Content Why Introduction Designs 1 3 2 Q&A 4
  • 3. Introduction
  • 4. Some info: - Servers: ~700 - ZiDB: ~115 instances - Memcached: ~80 instances - MySQL: ~20 instances - Cassandra: ~8 instances - Others: Gearman, Scribe, HBase, ZiHttpd, ZiProxy, ..: many many How to manage?
  • 5. Why
  • 6. - Too many services to keep in your head - Auto synchronize configuration changes - C/C++/Java/PHP (or any) apps can share same configurations
  • 7. Designs
  • 8. System design
  • 9. Modules design
  • 10.
    • - Written in C++
    • - NonblockingServer with Thrift interface
    • - Cache: hash table data structure with zallocator is designed to reduce memory fragmentation
    • - Persistent DB: ZiDB core
    • - Very high performance: 180K reads per second
    ServicesMap
  • 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