Off the top of my head - one way to do this would be to use NGINX to
proxy to three (or more) internal CP processes. Say,
http://localhost:8080/ and
http://localhost:8081/ and
http://localhost:8082 where the process listening on port 8080 serves
up /a and the process listening on 8081 serves up /b, and 8082 serves
up /c.
Then setup nginx to have a custom 502/503 html page - so that if any
one of these processes is down it serves up a nice page explaining the
situation. Then you can restart any of the processes independently
from the rest. You're probably going to want to have nginx proxying
to CP anyways as that seems to be what many of us do these days
anyways.
Honestly - there doesn't even have to be anything different between
the three processes aside from the port they live on. They could be
run the same python/cherrypy configuration/setup and be able to handle
/a/ or /b/ or /c/ - but because nginx never passes anything but one of
the set to that process, then that process will only deal with the one
set of urls.
I don't have time to give you a full explanation of how to setup the
NginxProxy settings, but i'll look something like this:
http://pastebin.com/UVZm6Bsu
You would also likely want to turn on tools.proxy within CP which will
take that Host header and use it, instead of the internal host header
which will always be something like:
127.0.0.1:8080
There are probably other ways, but it was the first i thought of
Lakin
> --
> You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
> To post to this group, send email to
cherryp...@googlegroups.com.
> To unsubscribe from this group, send email to
cherrypy-user...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/cherrypy-users?hl=en.
Off the top of my head - one way to do this would be to use NGINX to
proxy to three (or more) internal CP processes. Say,
http://localhost:8080/ and
http://localhost:8081/ and
http://localhost:8082 where the process listening on port 8080 serves
up /a and the process listening on 8081 serves up /b, and 8082 serves
up /c.
Then setup nginx to have a custom 502/503 html page - so that if any
one of these processes is down
location / {
proxy_pass
http://backend_servers;
}
location /files/ {
proxy_pass
http://fileserver;
proxy_hide_header Content-Type;
> --
> You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
> To post to this group, send email to
cherryp...@googlegroups.com.
> To unsubscribe from this group, send email to
cherrypy-user...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/cherrypy-users?hl=en.