vibora icon indicating copy to clipboard operation
vibora copied to clipboard

How can vibora integrate with Nginx?

Open RealLau opened this issue 5 years ago • 2 comments

I'm wondering how can I do integration with vibora between Nginx, and will this improve the performance higher than running command python xxx.py? Has someone done this research? Share ur answer pls.

BTW, can not wait the awesome vibora release :)

RealLau avatar Sep 04 '18 03:09 RealLau

@RealLau I doubt that Nginix will improve performance. Because Nginix itself has a limitation on how many requests per second it can handle. But you can check this out: https://github.com/vibora-io/vibora/blob/master/docs/deploy.md

s0kil avatar Sep 08 '18 21:09 s0kil

@RealLau I'm not sure in which terms do you imply nginx would have a better performance, I guess maybe what you mean is probably the possibility to have multiple workers listening for a request right (like gunicorn permits you so) ?

If you mean raw perfs, there is clearly no need for WSGI as stated in the link posted by @DanielSokil and setting up an nginx reverse proxy on front of your vibora server would help for other matters (SSL, for example) but not performance.

Now in a production-based environment, nginx could be used as a load balancer like so:

http {
    upstream vibora {
        server {some_ip_here};
        server {some_ip_here};
        server {some_ip_here};
    }

    server {
        listen 80;

        location / {
            proxy_pass http://vibora;
        }
    }
}

If you're having more and more requests coming in, it would enhance performance but that's a known schema and does not apply only for Vibora but for any webserver out here (horizontal scaling).

afranche avatar Nov 09 '18 08:11 afranche