loentar / ngrest

Fast and easy C++ RESTful WebServices framework
Apache License 2.0
464 stars 93 forks source link

ngrest and proxy #71

Open atari83 opened 3 years ago

atari83 commented 3 years ago

Hello there,

I've a scenario and need your input about its development feasibility with ngrest.

So, we're using nginx as webserver, and would like to develop a rest service module for it by ngrest.

The rest service receives requests (POST method) from various clients. Normally it has to validate the incoming requests (body and headers), and may send response with error to clients in case of malformed or mistakes in requests.

If validation passed, then my webserver need to act as proxy, so basically request has to be forwarded to other webserver(s) to process and my webserver has to deliver the response back to client.

Could you please elaborate on this request and it's implementation. Specially the proxy function. What should i consider with ngrest module development and nginx configuration.

Thanks

JL2014 commented 2 years ago

Hi @atari83,

Sorry for late response, but Nginx in front of ngrest already do the job. See https://serverfault.com/questions/480241/nginx-failover-without-load-balancing for example.

Greetings, JL.