TCP Proxy: Hold connections while backend is unavailable

一笑奈何 提交于 2019-12-12 21:29:46

问题


In the context of a Docker setup, I want to use an ambassador-like pattern to allow some container (e.g., database server) to restart gracefully without having to restart all dependent containers (e.g., web server) and without error messages because "database server is not available".

Therefore, I was wondering: Is there a TCP proxy software (that would run in the ambassador container) that can accept and hold connections if the backend is down and re-establish them when it is back? In the case of web and database server, it should appear to the web server as if the database server just takes longer than usual to reply (like, 30 seconds), but will eventually answer the query.

Is such a thing possible at all? Is there a tool that can realize such a behavior?

来源:https://stackoverflow.com/questions/25031011/tcp-proxy-hold-connections-while-backend-is-unavailable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!