为什么我要使用 unicorn 或 Thin 而不是 WEBrick 用于开发目的? [英] Why would I want to use unicorn or thin instead of WEBrick for development purposes?

查看:55
本文介绍了为什么我要使用 unicorn 或 Thin 而不是 WEBrick 用于开发目的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近发现有些人更喜欢使用 unicorn_rails 而不是默认的 WEBrick 作为开发 Rails 应用程序的 Web 服务器.

I've recently found that some people prefer using unicorn_rails instead of the default WEBrick as a web server for developing Rails applications.

我知道如果我想在生产中使用 unicorn,在开发中尝试它可能是有意义的,但由于生产中的配置不同,它甚至相关吗?

I understand that if I wanted to use unicorn in production, it could make kind of sense to try it out in development, but since the configuration is different in production, is it even relevant?

使用 thinunicorn 而不是 WEBrick 来开发 Rails 应用程序,我是否会获得任何真正的、有形的优势,例如速度或某些附加功能? 或者这只是个人喜好问题?

Is there any real, tangible advantage that I would get from using thin or unicorn instead of WEBrick for developing a Rails application, such as speed or some additional features? Or is this just a matter of personal preference?

推荐答案

开发尽可能贴近生产环境很重要.它有助于确保应用程序在部署到生产环境时按预期工作,而不是在运行时遇到错误.

It is important to develop as closely as possible to the production environment. It helps ensure that an application will work as expected when deployed into production, instead of stumbling upon bugs at runtime.

在复制生产环境的构建服务器上使用持续测试可以缓解这个问题.即使您没有在相同的环境中积极开发,持续测试也会让您了解应用程序以预期方式运行.

This issue is alleviated with the use of Continuous Testing on a Build server that replicates the production environment. Even though you are not actively developing on an identical environment, the Continuous Testing gives you coverage that the application is functioning in the expected way.

至于速度,在开发模式下运行 Rails 应用的性能损失将抵消各种网络服务器带来的任何好处.

As to speed, the performance hit running a Rails app in development mode will negate any benefit the various web servers brings.

这篇关于为什么我要使用 unicorn 或 Thin 而不是 WEBrick 用于开发目的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆