I kept all this complexity in mind when building Bidscape. I wanted Bidscape to provide speed, reliability, correctness, and debugging ability in an integrated way.
To get the fastest performance one must use a globally distributed CDN and limit file size, number of requests and use good caching headers. To keep our customers’ flexibility, we limit caching to 5 minutes and server our customers ad code from our globally distributed CDN. We keep the entire configuration including prebid.js core and bidAdapters in a single file to limit round trips.
Use the fewest possible points of failure between the user and your content. Our users ad configurations are saved and uploaded to our CDN. Once this file is on our CDN we no longer have any servers in the critical path. We only need our CDN provider to be available. In the event of failure of our infrastructure which is hosted on a different provider, our CDN continues on serving our customers’ ads. All other services are out of band. We don’t want them to go down, obviously but we keep our customers safe if and when they do. We are even prepared for our CDN being down by maintaining our own infrastructure that we can fail-over to at DNS level.
Minimize external dependencies. Rely only on widely compatible browser APIs and use only what you really need keep your footprint small and any opportunity for failure low. Leverage patterns such as functional programming and immutability. Finally, test extensively.
The approach we’ve taken is built to optimize for what our customers need. A consistent and reliable way for their sites to be profitable by serving their ads.