HAProxy load balancer before Django instances

I would like haproxy to cache / redirect the URL / static /.+ for my django instances in order to speed up the static file. What is the best way to do this?

+3
source share
2 answers

As far as I know, HAProxy does not perform caching. For this you want something like Squid.

As for processing / static / separately, you can configure your HAProxy configuration to redirect any URLs matching the pattern to another cluster:

frontend my_website *:80
    mode http
    acl static url_beg /static/
    use_backend my_static_proxy if static
    default_backend my_django_server
+5
source

Source: https://habr.com/ru/post/1707998/


All Articles