Hmmm,
--Flow--:
1. Clients
2. Client server with nginx (loadbalancer)
3. Myproject servers (3x)
Do you know if a request is stateful/stateless between 1 and 2 ? (when it arrives at 2)
(if you can detect the state you can use 2 upstreams)
If this flow is not correct please edit because your description is not really clear to me. Ea. where is your API located? between 1 and 2? if so what 'edit' methods do you have at API level (can you add a header)?
If your API is not intelligent enough you may have to flip it with the loadbalancer and use 3 API's (behind nginx).
If the API is not too complicated you might consider rewriting it in Lua and embed it in nginx.
--Flow--:
1. Clients
2. Client server with nginx (loadbalancer)
3. Myproject servers (3x)
Do you know if a request is stateful/stateless between 1 and 2 ? (when it arrives at 2)
(if you can detect the state you can use 2 upstreams)
If this flow is not correct please edit because your description is not really clear to me. Ea. where is your API located? between 1 and 2? if so what 'edit' methods do you have at API level (can you add a header)?
If your API is not intelligent enough you may have to flip it with the loadbalancer and use 3 API's (behind nginx).
If the API is not too complicated you might consider rewriting it in Lua and embed it in nginx.