Hello,
I'm creating a REST microservice with Nim and Jester (in Windows). My API will have just a few end-points and just a few simultaneously clients will consume it. When I say 'few clients', I mean that at most just 3 concurrent users will consume the API - if so. The JSON data returned per each call will have no more than 10 kbytes.
Considering the spec of my case scenario above, do I really need to set up a reverse proxy to retrieve the resources on behalf of a client from my server?
Could not I simply use the Jester server as a Nim binary (EXE) to run my web service?
Would I have some performance gain using a reverse proxy?
Best, AN
Reverse proxies like Varnish or Nginx can be used to bundle different Web services (multiple HTTP APIs, static files, etc) together under one domain, and offer additional benefits like caching, load balancing, and DoS protection.
But it is entirely possible to run a server like Jester by itself without a reverse proxy, on a subdomain or even your main domain.
Using a reverse proxy is not about performance. It's about security.
The HTTP server which Jester uses hasn't been tested well enough in the wild for me to be comfortable telling developers to expose it to the wide internet.
Of course you are more than welcome to do so, especially if your service will not be exposed to everyone on the internet.