从服务器故障中拯救 Rails 应用
我有一个 Rails 应用程序,现在托管在专用服务器上。今天发生了一些事情:应用程序没有响应,我没有 ssh 访问权限,重新启动没有帮助,我正在等待技术支持响应。但这不是问题,我只需要这个应用程序在线,即使服务器出现故障。哪个是最简单的选择?我可以在不同的主机上创建第二个服务器并在出现故障时从那里提供服务吗?如果可以,如何同步数据库和文件?应用程序负载并不重,我只需要它可用即可。
I have a rails app which is now hosted on dedicated server. Today something happened: app doesn't respond and I have no ssh access, restarting doesn't help and I am waiting for tech support to respond. But this is not a question, I just need this app to be online even if server fails. Which is the easiest option? Can I create second server on different hosting and serve from there in case of failure, if so, how to sync db and files? Application is not heavily loaded, I just need it to be available.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题很难解决。没有一种经过验证的方法可以实现这一点,但总的来说,您需要“无单点故障”。
有一门完整的科学致力于网络应用程序的可靠性——您不可能在一个如此问题中得到答案。
您可以频繁备份数据库,将它们存储在 S3(和/或其他位置)上。然后,您可以
Difficult problem to solve. There's no one proven way to make this happen, but in general you need "No Single Point of Failure"
There's an entire science devoted to reliability in web applications -- no way can you get that answered in a SO question.
You can take frequent backups of your database, store them on S3 (and/or somewhere else). You can then