ruby on rails - How to avoid first byte timeout with nginx -


i have application in rubyonrails, proxied nginx server behind cdn service. cdn has limitation if response first byte not arrive in 60 seconds, cdn server responds:

error 503 first byte timeout

the problem have requests take more 60 seconds processed on rails side. there way hack response, sending few bytes before response finish processing? how?

given stored on cdn, can assume public content, , such, it's long request period in case. should aiming keep public requests under second.

one option use cdn "push zones" can generate content like, , push content cdn storage near user. assuming there's small number of fixed resources rather dynamic content multitude parameters.

beyond that, @ ways optimise response time via caching , on.


Comments