Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Beyond Rails Server
Search
Michael Chen
November 17, 2012
Technology
1.1k
19
Share
Beyond Rails Server
For RubyConf China 2012
Michael Chen
November 17, 2012
More Decks by Michael Chen
See All by Michael Chen
Reconsider REST: 一种构建大型Rails应用的方式
mechiland
11
1.3k
Other Decks in Technology
See All in Technology
Percolatorを廃止し、マルチ検索サービスへ刷新した話 / Search Engineering Tech Talk 2026 Spring
visional_engineering_and_design
0
130
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.4k
AI와 협업하는 조직으로의 여정
arawn
0
510
20260428_Product Management Summit_Loglass_JoeHirose
loglassjoe
2
3.6k
AI時代における技術的負債への取り組み
codenote
1
1.7k
運用システムにおけるデータ活用とPlatform
sansantech
PRO
0
120
LLM時代の検索アーキテクチャと技術的意思決定
shibuiwilliam
3
1.5k
弁護士ドットコム株式会社 エンジニア職向け 会社紹介資料
bengo4com
1
180
ServiceNow Knowledge 26 の歩き方
manarobot
0
150
M5Stack CoreS3とZephyr(RTOS)で Edge AIっぽいことしてみた
iotengineer22
0
280
Pure Intonation on Browser: Building a Sequencer with Ruby
nagachika
0
150
Cortex Codeのコスト見積ヒントご紹介
yokatsuki
0
110
Featured
See All Featured
The SEO identity crisis: Don't let AI make you average
varn
0
450
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
480
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
95
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.8k
AI: The stuff that nobody shows you
jnunemaker
PRO
6
580
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
200
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
140
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
We Have a Design System, Now What?
morganepeng
55
8.1k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
150
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
240
Transcript
Beyond `rails server` Rails全栈技术指南
陈金洲 @mechiland Picture taken by Michael Chen
部署 监控 架构演进
gem install rails
RVM
rails g scaffold
GET PUT POST DELETE show update create destroy SELECT UPDATE
INSERT DELETE Programming Model
rails server
None
“15分钟创建Blog” “24小时创建一个网站”
“15分钟创建Blog” “24小时创建一个网站”
“15分钟创建Blog” “24小时创建一个网站”
1. 部署
jinshuju.net
None
Browser Web Server App Server Database
Browser Web Server App Server Database ? ? ? ?
注册域名
‣ www.domain.com ‣ *.domain.com ‣ MX 记录 ‣ TXT 记录
域名
主机
备案
None
None
cannot find this picture source
Web, App, DB
硬件准备完毕…… jinshuju.net
Git master dev feature 1 feature 2
部署 cap deploy
除了CRUD resque + god cronjob + whenever
持续部署 DEV UAT PROD
2. 监控
[h]top
vmstat w uptime ps free iostat sar mpstat pmap netstat
ss iptraf tcpdump strace /proc
None
None
监控什么?
硬盘 www/db服务状态 Google Analytics CPU ⻚页⾯面响应时间 微博@ 内存 4xx/5xx⻚页⾯面 ⽤用户⾏行为数据
带宽 邮件队列 ……
硬盘 www/db服务状态 Google Analytics CPU ⻚页⾯面响应时间 微博@ 内存 4xx/5xx⻚页⾯面 ⽤用户⾏行为数据
带宽 邮件队列 可⽤用性影响逐渐减少 实际花费时间逐渐增加
3. 架构演进 http://www.flickr.com/photos/declicjardin/309583331
None
None
初始 Model View Controller DB
进行中 Model View Controller DB Model View Controller DB Model
View Controller DB
真实情况 Model View Controller DB Model View Controller DB Model
View Controller DB Model View Controller DB Model View Controller DB
JavaEE/.NET
Rails/Linux的方式 resque cronjob
‣ 前台进程、后台进程、cronjob ‣ 前台进程保证响应时间在可接受范 围之内(<200ms) ‣ 将耗时操作放入后台(delay_job, resque, sidekiq) ‣
善用cronjob(whenever)
代码行阈值 3000
随时准备应用剥离 Picture taken by Michael Chen
核⼼心应⽤用 domain.com
核⼼心应⽤用 domain.com 核⼼心部分 domain.com ⽀支付 payments.domain.com
核⼼心应⽤用 domain.com 核⼼心部分 domain.com ⽀支付 payments.domain.com 核⼼心部分 domain.com ⽀支付 payments.domain.com
⽤用户管理 my.domain.com
‣ 将架构演进视作正常行为 ‣ 警惕代码行数 ‣ 随时准备剥离,进行进程分离 ‣ 为引入新技术做好准备
X. 免费赠送 http://www.flickr.com/photos/rtv/2269548635
B2B Go B2b, B2C
rubygems.org
not just What It’s about How and Why
部署 实现持续部署 监控 监控应用行为 架构演进 警惕规模变大 Beyond `rails server`
谢谢! @mechiland 陈金洲 http://michael.nona.name