http - Routing requests to multiple backend servers Dropwizard and Elasticsearch -
i have backend servers :
- a dropwizard server serves application server. server used frontend operations except searching.
- an elasticsearch server feeded dropwizard server serves frontend search queries.
knowing dropwizard running on port 8080 , elasticsearch on port 9200, there strategy have single frontend (nginx example or apache) can used route search request elasticsearch , non search request dropwizard (adding headers distinguish search request or using different path in url search request)?
i open suggestion or configuration,
thanks in advance,
nginx configurations
you can proxy them own ports:
server { listen 8080; location / { proxy_pass http://dropwizard-host:8080/; } } server { listen 9200; location / { proxy_pass http://elasticsearch-host:9200/; } }
or have them mapped same port different path:
server { listen 80; location /dropwizard { proxy_pass http://dropwizard-host:8080/; } location /elasticsearch { proxy_pass http://elasticsearch-host:9200/; } }
Comments
Post a Comment