I am currently working on an ad server that will allow registered advertisers to offer bids for showing on the sites of registered publishers. Advertisers will pay for CPM.
Some desirable service attributes:
- About 10 milliseconds to get to the ad that will be submitted, completing the bidding process.
- Support for about 10 thousand simultaneous ad requests. This number may increase over time.
From an architectural point of view, are there any general recommendations for such a service? Are there any reservations to keep in mind?
To make it scalable, the service must be distributed. Which data warehouse should match the account? I gravitate towards Cassandra.
Since advertisers will pay per thousand impressions, I think that for tracking impressions you will need to maintain some kind of counter. How can I ensure, given the very parallel and distributed nature of the application, that impression count is not lost / wrong.
Similarly, how can you ensure that the cost of the campaign never exceeds the budget allocated for the campaign (an example of a scenario I want to avoid: the budget is $ 100, $ 99, the remaining $ 1, two impressions, each of which costs 0, $ 75, served simultaneously, accepting a cost of $ 100.5 when the maximum budget was only $ 100.
Any help would be greatly appreciated.
Thanks RK
source share