简体   繁体   English

Ruby on Rails Web服务器

[英]Ruby on Rails web server

I'm new to web development, and have a question about deploy ruby on rails application. 我是Web开发的新手,并且有一个关于在Rails应用程序上部署ruby的问题。

For what i'm understanding, there are two ways to deploy. 据我了解,有两种部署方式。 One is using cloud server like Heroku (I'm currently using). 一种是使用像Heroku这样的云服务器(我目前正在使用)。 You just need to upload your project to their cloud server and ready to go. 您只需要将项目上传到他们的云服务器即可使用。

Another way is build your own server using, for example, apache+passenger. 另一种方法是使用apache + passenger构建自己的服务器。 By doing this way, I need to have a physical computer with Ubuntu + Apache + Passenger running continually right? 通过这种方式,我需要使一台物理计算机连续运行Ubuntu + Apache + Passenger,对吗?

So my question is which way is better, faster? 所以我的问题是哪种方法更好,更快?

Heroku has a form of automated deployment built-in. Heroku具有内置的一种自动部署形式。 There are other cloud-based providers which offer a similar sort of service. 还有其他基于云的提供商可以提供类似的服务。

The alternative is self-hosted. 另一种方法是自托管。 You don't need a "physical computer", you can use a virtualized server in the cloud just the same. 您不需要“物理计算机”,就可以像在云中一样使用虚拟服务器。 Popular choices are Linode , Digital Ocean and Amazon EC2 which is what Heroku is based on. 受欢迎的选择是Heroku所基于的LinodeDigital OceanAmazon EC2

"Better" is highly subjective. “更好”是高度主观的。 Do you know how to maintain a server? 您知道如何维护服务器吗? If the answer to this question is "No", then Heroku is probably the best bet. 如果对这个问题的回答是“否”,那么Heroku可能是最好的选择。

If you do know how to maintain a server, you can usually get better performance from your own rig since you have full control over how your application is launched, how long it stays running, and can increase resources at marginal additional cost. 如果您确实知道如何维护服务器,通常可以从自己的设备中获得更好的性能,因为您可以完全控制应用程序的启动方式,运行时间以及可以以少量的额外成本增加资源。 The downside is you're responsible for everything should it malfunction. 不利的一面是,您应对一切故障负责。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM