热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

RaspberryPi的最小服务器设置-可扩展性并不重要-SmallestserversetupforRaspberryPi-scalabilitynotimportant

ImbuildingasystemthatmanageshomeHVACandusesaRaspberryPirunningRubyonRails3.2with

I'm building a system that manages home HVAC and uses a Raspberry Pi running Ruby on Rails 3.2 with Ruby 2.0. Nearly all web content is dynamic. Scalability is not important, as it's only used within a home network and by only one or two simultaneous users. What's important is using minimal memory. Reliability is also very important. Fast is good. Does it make sense to just use the default Webrick server in production, or is there value in fronting it with say Apache or Cherokee and/or replacing it with Passenger or Puma or something else?

我正在构建一个管理家用HVAC的系统,并使用运行带有Ruby 2.0的Ruby on Rails 3.2的Raspberry Pi。几乎所有的网络内容都是动态的。可扩展性并不重要,因为它仅在家庭网络中使用,并且仅由一个或两个同时用户使用。重要的是使用最少的内存。可靠性也很重要。速度很快。在生产中使用默认的Webrick服务器是否有意义,或者说使用Apache或Cherokee和/或用Passenger或Puma或其他东西替换它是否有价值?

1 个解决方案

#1


3  

Don't use use Webrick in production environments. It lacks support for handling concurrent requests and is optimized for development. Adding a fully blown webserver like Apache would not help you to reduce the memory.

不要在生产环境中使用Webrick。它缺乏对处理并发请求的支持,并且针对开发进行了优化。添加像Apache这样完全成熟的网络服务器无助于减少内存。

I recommend to use Thin in your scenario. It's a fast and lightweight webserver written in Ruby.

我建议在您的方案中使用Thin。它是一个用Ruby编写的快速轻量级的Web服务器。


推荐阅读
author-avatar
usually111131
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有