1. Scene
Two servers are deployed with XXL job respectively to build a high availability cluster
Provide easy request URL
2. Nginx configuration
upstream xxl-jobs {
server 192.168.30.01:9500 max_fails=3 fail_timeout=30s;
server 192.168.30.02:9500 max_fails=3 fail_timeout=30s;
}
server {
listen 8888;
server_name localhost;
location/{
proxy_pass http://xxl-jobs;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}