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
PHPで運用中のサービスをRubyに切り替える
Search
takanamito
January 18, 2017
Technology
5.5k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PHPで運用中のサービスをRubyに切り替える
「Rubyエンジニアが語る2016年の振り返りとこれから」での発表資料です。
https://speee.connpass.com/event/47616/
takanamito
January 18, 2017
More Decks by takanamito
See All by takanamito
ActiveModel::Attributes APIとSwaggerでRailsのAPIレスポンスに型を持ち込む
takanamito
0
680
ドキュメントとテストのないプロジェクトを引き継ぐ
takanamito
2
3.6k
Siriに身の回りのお世話をしてもらう
takanamito
0
7k
安心してフレームワークをのりかえたい
takanamito
0
1.3k
HLSでやっていく 動画ストリーミング配信
takanamito
0
2.6k
あんしん大規模リプレースサポート
takanamito
1
1.8k
Other Decks in Technology
See All in Technology
会社説明資料
persolserverworks
0
9.8k
事業成長とデータ活用を止めないためのマネジメントへ挑戦
hiracky16
0
400
10年後、Engineering 行為を剥奪されるとして、わたしたちは、どう、何を創ればいいだろうか。 / If Engineering Is Taken Away in 10 Years, How and What Should We Create?
bitkey
PRO
1
200
Webの常識が通じないHTMLメールのダークモード
teamlab
PRO
0
130
AI コーディングと人間の認知スループット / CTO Night & Day 2026 Morning Session / AI Coding and Human Cognitive Throughput
prog893
5
1.3k
Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
1
760
夫婦で子育てするための育児標準化
codmoninc
PRO
0
450
Active Record Connection Adaptersにおける長年の課題に再び取り組む
yahonda
0
200
Claude の新機能を、 出た日に触って社内に届けるまで
rfdnxbro
1
190
AI駆動で「他アプリの音を加工できる」アプリを作った
satomasahiro2005
0
170
Post AI時代のリファクタリング実践記 / Refactoring in the post AI era
kaminashi
1
280
フロントエンドカンファレンス関西2026 - 速すぎるUIに、待ち時間を
teamlab
PRO
0
190
Featured
See All Featured
Building Adaptive Systems
keathley
44
3.3k
RailsConf 2023
tenderlove
30
1.6k
Crafting Experiences
bethany
1
380
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Utilizing Notion as your number one productivity tool
mfonobong
4
620
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
What's in a price? How to price your products and services
michaelherold
247
13k
Believing is Seeing
oripsolob
1
250
Git: the NoSQL Database
bkeepers
PRO
433
67k
Side Projects
sachag
456
43k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Transcript
PHPͰӡ༻தͷαʔϏεΛ RubyʹΓସ͑Δ
ࣗݾհ • id: takanamito • ॴଐ: גࣜձࣾSpeee ւ֎ϝσΟΞνʔϜ
ΞδΣϯμ • RubyΓସ͑લͷςετ • RubyΓସ͑ޙͷࢹମ੍
1. RubyΓସ͑લͷ ςετ
ASEAN͚ਓࡐϝσΟΞ • ඦສPV / ݄ • 2΄ͲFuelPHPͰՔಇ • 1action 100~200ߦͷcontroller͕ෳ
• ϦϑΝΫλͷݶք
None
2016 RubyҠߦ • ͖͔͚ͬSpeeeશࣾͷRubyҠߦ • ϚελσʔλΛ৽͍ͨ͠ • URLϧʔϧΛม͍͑ͨ • چˠ৽URLʹ301ϦμΠϨΫτ
/hoge/joblist -> /joblist/hogehoge
ͨͩ͠ URL10ສҎ্
10ສҎ্ͷURLΛ301ϦμΠϨΫτ • ϦμΠϨΫτϩδοΫ͕όάͬͯΔͱࢮ͵ • σʔλ͕ؒҧͬͯͯࢮ͵ σʔλͷଥੑ֬ೝΛؚΊͨςετΛ ͍͍ײ͡ʹΓ͍ͨ
kage • γϟυϓϩΩγαʔόʔͷgem • ຊ൪ͷτϥϑΟοΫΛෳ͠ ։ൃαʔόʔʹྲྀ͢
LBHF 'VFM1)1 3BJMT શϦΫΤετΛ 'VFM1)1ʹ (&5ϦΫΤετ ͚ͩෳ
Kage::ProxyServer.start do |server| server.port = 8090 server.host = '0.0.0.0' server.add_master_backend(:production,
'xxx.xxx.xxx.xxx', 80) server.add_backend(:sandbox, 'xxx.xxx.xxx.xxx', 80) server.client_timeout = 15 server.backend_timeout = 10 server.on_select_backends do |request, headers| if request[:method] == 'GET' [:production, :sandbox] else [:production] end end ~~ தུ ~~ end def compare(production_res, sandbox_res, url) # ͜ͷลͰresponseݟͯϩάग़ͨ͠Γ͢Δ end
kageͷϩά "Response diff 404, 301, /hoge/joblist" "Response diff 200, 404,
/fuga/joblist" "Response diff 404, 301, /hoge/fuga/job" ˢ 1)1 ˢ 3VCZ ˢ ֘63- ϩάʹग़ྗ͞ΕͨURLΛ 1ͭͣͭ֬ೝ͍ͯ͘͠
2छྨͷςετͰ҆৺ • ϩδοΫςετίʔυͰݕূ • σʔλؚΊݕূ͢ΔͨΊʹ ຊ൪τϥϑΟοΫΛྲྀ͢
2. RubyΓସ͑ޙͷ ࢹମ੍
ϦϦʔεޙͷ՝ • ҙਤͤͣ40x, 30x͕ฦ͍ͬͯΔ߹ • ϨεϙϯελΠϜͷѱԽ Ͱ͖Δ͚ͩૣٸʹؾ͖͍ͨ
IUUQTTQFBLFSEFDLDPNTFMNFSUTYTQFFFOJPLFSVKJBOTIJUVSVGBMTFYVBOEJOHQVSPTFTV
DatadogͰ αʔϏεঢ়گΛࢹ
None
ˢ &-#Լͷ&$ ˢ &-#ʹྲྀΕΔ ϦΫΤετྔ ˢ (PPHMF"OBMZUJDT ϦΞϧλΠϜ
&-#͕ฦ͢Ϩεϙϯεͷεςʔλε ˣ ˢ &-#͕ฦ͢ϨεϙϯεͷϨΠςϯγʔ
None
४උͷ݁Ռ • େ͖ͳোͳ͘ҠߦΛΓΕ·ͨ͠ • DatadogͷμογϡϘʔυʹ ͲΜͲΜॏཁͳKPI͕ू·Δ