Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Beyond Rails Server
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Michael Chen
November 17, 2012
Technology
1.2k
19
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
メルペイ 会計システム概要と歴史
mewuto
0
150
AI駆動開発、viviONの1年 ── うまくいったこと・いかなかったこと
vivion
0
240
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
16
120k
事業活動を AI Ready にする攻めと守りのデータエンジニアリング / data-engineering-for-ai-ready-business
pei0804
1
140
あなたの知らないAmazon VPC Route Server/Amazon VPC Route Server you don't know about
masakiokuda
2
220
購入ドメインでの課題と取り組み
ykagano
0
130
契約書画像からの情報抽出に特化した視覚接地モデルを育てる話
sansantech
PRO
1
140
【データ横丁主催】AI Agentがコンテキストを使って仕事をした後、何が残るのか― 組織の経験を次の判断に引き継ぐ「Agent Memory」
shisyu_gaku
2
330
Execution in the Kingdom of Agents: Reflections on Abstraction and Complexity
bcantrill
0
840
HacobuにおけるFDEとは/登壇資料(戸井田 裕貴)
hacobu
PRO
1
780
Claude起点の仕様駆動開発
tanakaseiya
0
380
[2026 Oracle Technical Deep Dive] OCI AI Resilience -OCIのセキュリティ対策機能をきちんと使いこなす- (2026年9月17日開催)
oracle4engineer
PRO
0
130
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
22k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Design in an AI World
tapps
1
350
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
860
Being A Developer After 40
akosma
91
590k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Facilitating Awesome Meetings
lara
57
7.2k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
610
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
550
Deep Space Network (abreviated)
tonyrice
0
350
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