Open sub2u opened 9 years ago
Your NGINX server will run on every dyno and the Heroku Router is a layer in front of these dyno's, so when your app receives a request, it will always pass through the Heroku Router before hitting NGINX. This is why you see the router logs.
You can check the response header (X-Cache-Status
from your example) to see if the NGINX cache is working.
Did anyone figure this out?
I have a config which works on my local machine with proxy reverse cache. It bypass the hitting the box every time.
I used nginx-build pack with proxy cache but on nginx every time it hit the box i can observe heroku[router] on logs
providing the config for reference in bottom.
Sample config
daemon off;
Heroku dynos have at least 4 cores.
worker_processes <%= ENV['NGINX_WORKERS'] || 4 %>;
events { use epoll; accept_mutex on; worker_connections 1024; }
http { gzip on; gzip_comp_level 2; gzip_min_length 512;
}