So, I have an idea of creating highload app using Ruby on rails. However there are some questions about the conception of the project.
The main idea is
Client->Load Balancer -> Server_1 ->Database_1 (Master) -> Server_2 ->Database_2 (Slave)
I've understand that the load balancer analyzes the traffic and send it to one of the servers. They call the database to retrieve data, but I want to include here
- Statistic server that gazer the data on many layer.
- API server that allows developers communicate with server.
- Cache server
Concerning the first item, I think that I should put it behind load-balancer too and just send important data to it via the application. Am I right? But I don't know where I should put the API server, because it should operate separately. Is there in load-balancer some functionality that allow resend request to another server, like if the query
api.example.com/get/data/id/1 was asked, than send it to
server_3 where methods that execute this query are?
And the last one question is about the cache server. I'm not quite understand how for example azure web-balancer works? Can it solve this issue or I should add my own cache server? And where should it be placed?
P.S. I'm just read it and try to build approximate picture of my project.