Answer the question
In order to leave comments, you need to log in
How to set up Nginx (api/static) balancing?
I'm doing a document processing service. I have several servers, some of them are for a highly loaded API service (REST, POST / GET requests), and some are for statics, registration, statistics, control panel, ...
While I'm balancing
just upstream www {
server xx .xx.xx.xx;#weight=2;
server yy.yy.yy.yy;
server zz.zz.zz.zz;
}
It works. But how can I now separate the requests so that the url https://server.name/api requests are distributed between the above servers, and all other requests are distributed to the server with static/registration, to some nnn.nnn.nnn.nnn ?
It would also be nice if it was possible to send POST requests to several shards, and GET requests to other servers.
The question is simple, but I can not properly configure the balancing.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question