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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Michael Chen
November 17, 2012
Technology
19
1.1k
Beyond Rails Server
For RubyConf China 2012
Michael Chen
November 17, 2012
Tweet
Share
More Decks by Michael Chen
See All by Michael Chen
Reconsider REST: 一种构建大型Rails应用的方式
mechiland
11
1.2k
Other Decks in Technology
See All in Technology
マイグレーションガイドに書いてないRiverpod 3移行話
taiju59
0
330
「使いにくい」も「運用疲れ」も卒業する UIデザイナーとエンジニアが創る持続可能な内製開発
nrinetcom
PRO
1
760
AI Agentにおける評価指標とAgent GPA
tsho
1
250
サンタコンペ2025完全攻略 ~お前らの焼きなましは遅すぎる~
terryu16
1
550
Snowflake Night #2 LT
taromatsui_cccmkhd
0
280
技術キャッチアップ効率化を実現する記事推薦システムの構築
yudai00
2
160
primeNumber DATA MANAGEMENT CAMP #2:
masatoshi0205
1
640
Claude Cowork Plugins を読む - Skills駆動型業務エージェント設計の実像と構造
knishioka
0
190
Microsoft Fabric のワークスペースと容量の設計原則
ryomaru0825
2
210
Eight Engineering Unit 紹介資料
sansan33
PRO
1
6.8k
大規模な組織におけるAI Agent活用の促進と課題
lycorptech_jp
PRO
5
7.2k
パネルディスカッション資料 (at Tableau Now! - 2026-02-26)
yoshitakaarakawa
0
790
Featured
See All Featured
Scaling GitHub
holman
464
140k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Evolving SEO for Evolving Search Engines
ryanjones
0
140
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
560
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Practical Orchestrator
shlominoach
191
11k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
360
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
140
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
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