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
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
もりもり新機能を一挙紹介! AgentCoreに入門して、AWS上にAIエージェントを構築しよう
minorun365
PRO
6
350
Datadog 認定試験の概要と対策
uechishingo
0
210
個人AIからチームAIへ:開発における品質と生産性の再設計
moongift
PRO
0
320
エンジニアは生成AIと どのように向き合うべきか? ことばの意味という観点から
verypluming
3
300
先取りMaven4 ~16年ぶりのメジャーアップデート、その進化とは?~
ogiwarat
0
110
Javaで学ぶSOLID原則
negima
1
240
long-running-tasks
cipepser
2
450
oracle-to-databricks-migration-with-llm-and-dbt
casek
1
380
Fabric-cicd によるAzure DevOps デプロイ
ryomaru0825
0
170
AI フレンドリーなエラー監視を TypeScript で実現する
shinyaigeek
2
200
Anthropic AIネイティブ・スタートアップ構築のプレイブック を理解する
nagatsu
0
230
20260528_生成AIを専属DSに_Howの次にすべきことを考える
doradora09
PRO
0
270
Featured
See All Featured
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
54k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
550
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.3k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
Crafting Experiences
bethany
1
160
The untapped power of vector embeddings
frankvandijk
2
1.7k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
820
WCS-LA-2024
lcolladotor
0
610
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
310
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