On one project the authorities came up with to give affiliate websites banner + small JS file (when clicking on the banner, the script gets the current coordinates of the user and throws on our website with them in settings). Banner + JS is a BN package. For each partner can be different or only their own packages.
And the problem is that the first partner has 2.5 million uniques a week. And plans several more partners to find, i.e. the load will rise immediately and by a lot.
And here is the problem of how to organize such a distribution in the best way?
The project is written in PHP.
Alternatively, we considered a CDN, but we have all the same logic is present, only show a certain number of times, the ability to pause, etc.
Searching the web, I found a good presentation www.highload.ru/papers2009/12189.html
In the end, came up with the following system. And it would be desirable to hear opinion of experienced habravan as a valid solution, and perhaps there is something more elegant.
SS – the Server is static, stores, and distributes static
LB – load balancer to start probably software.
MS – (Main server) Server is the main project
CM (Content manager server). The management server SS'AMI receives commands from the MS and sends commands to the SS.
SHOW, HIDE, DELETE
- To store, remove and serve content BN
- Each installed Nginx, PHP, database MemcacheDB. All have the same configuration software
- Also has access to a database MemcacheDB on CM
- In our own MemcacheDB stores the current counters and statuses for all BN and periodically sinhroniziruete them with CM
- Has a set of scripts to handle incoming messages from CM
- Also stores the master copy of all current BN's
- Installed Nginx, PHP, database MemcacheDB.
- Can receive messages from the MS and send to SS
- SS can synchronize with the internal set BN's
- Leads the overall table for all BN's, with counters, current statuses, etc.
- Also maintain a table available (the IP ?) addresses all SS's. In the case of addition/removal SS'and in principle should be enough to add/remove the address in this table.
Such an alignment. Experience is unfortunately not enough in this kind of task, very interested in the opinion of habenaria.
May not steamed and go to cloud hosting? Or such loads there is a hefty price increases?
Thanks in advance!