At AppNexus we provide our clients with a RESTful API that allows people to manage all of their data in our adserving echosystem. The API is built on a LAMP stack with memcache sprinkled in to help out with session management and cacheing some commonly used objects. We have the typical cloud backend with various servers behind a load balancer with all of our servers housed in our East Coast data center.
When the time came for global expansion, we needed to spool up instances in our West Coast and European data centers.
Our Expectations:
Using our cloud backend, we could just spool up some virtual machines for Apache, memcache, and MySQL slaves replicating from the master in the East Coast. GET requests to the API will use the local MySQL slave and memcaches while POST/PUT/DELETE calls will go to the master database in the East Coast. Pretty damn simple, right?
Wrong! You didn’t think it would be that easy, did you?
Continue reading