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
PyCon2014China-Zhuhai-high performance
Search
Zoom.Quiet
November 17, 2014
Technology
0
160
PyCon2014China-Zhuhai-high performance
141115 in Zhuhai
http://zoomq.qiniudn.com/CPyUG/PyCon2014China/141115zh-pm6-pyhq.MP3
Zoom.Quiet
November 17, 2014
Tweet
Share
More Decks by Zoom.Quiet
See All by Zoom.Quiet
PyCon2014China-Zhuhai-meta programming
zoomquiet
1
130
PyCon2014China-Zhuhai-bpm.py
zoomquiet
0
110
PyCon2014China-Zhuhai-luna kv db
zoomquiet
0
91
PyCon2014China-Zhuhai-seed studio
zoomquiet
0
94
PyCon2014China-Zhuhai-Docker Registry Build By Python
zoomquiet
0
110
PyCon2014China-Zhuhai-jeff
zoomquiet
0
84
PyCon2014China-Zhuhai-pythonic front-end
zoomquiet
0
120
DevFest2014-Zhuhai-Polymer
zoomquiet
0
410
TEDxJLUZH MOMENT future
zoomquiet
0
370
Other Decks in Technology
See All in Technology
Gaze-LLE: Gaze Target Estimation via Large-Scale Learned Encoders
kzykmyzw
0
180
JOAI発表資料 @ 関東kaggler会
joai_committee
1
150
新卒(ほぼ)専業Kagglerという選択肢
nocchi1
0
1.5k
プロジェクトマネジメントは不確実性との対話だ
hisashiwatanabe
0
170
リモートワークで心掛けていること 〜AI活用編〜
naoki85
0
190
AIに頼りすぎない新人育成術
cuebic9bic
3
340
サイボウズフロントエンドの横断活動から考える AI時代にできること
mugi_uno
3
1.2k
意志の力が9割。アニメから学ぶAI時代のこれから。
endohizumi
1
110
プロダクトエンジニアリングで開発の楽しさを拡張する話
barometrica
0
220
形式手法特論:位相空間としての並行プログラミング #kernelvm / Kernel VM Study Tokyo 18th
ytaka23
3
1.5k
生成AI活用のROI、どう測る? DMM.com 開発責任者から学ぶ「AI効果検証のノウハウ」 / ROI of AI
i35_267
4
130
あなたの知らない OneDrive
murachiakira
0
150
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
70
11k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
How to Think Like a Performance Engineer
csswizardry
25
1.8k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Building Adaptive Systems
keathley
43
2.7k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.6k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
470
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Mobile First: as difficult as doing things right
swwweet
223
9.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
1k
Transcript
Python是否适合高性能web开发 温铭
高性能服务端的要素 • 多:高并发,支撑用户多 • 快:单个请求处理速度快 • 易:易开发,易维护,方便调岗和招人
技术实现 • 高并发:异步 • 处理快:缓存,减少IO • 易开发:库,只用关心逻辑
通用的架构 • Nginx -> py -> memcached(redis) -> mysql •
同步 • 跨服务器请求
理想的架构 • 异步、同步语法 • 多级缓存:进程、本机kv、跨服务器kv、 DB • 没有网络IO
现实:异步 • Tornado:第三方库齐全,回调 • Gevent:不改代码 • Asyncio New in python
3.4
现实:缓存 • functools.lru_cache New in version 3.2
Python的优势 • 丰富的库 • 开发快 • 易上手
嫁接 • Python + ?
嫁接 • Openresty:替换nginx,提供异步和共享缓 存 • Nginx -> py -> memcached(redis)
-> mysql • openresty-> py -> cache(openresty ) -> kv(openresty ) -> mysql(openresty )
自己写服务端? • 用户注册、登录 • 短信通知 • 消息推动 • 聊天 •
存储 • 支付 • …
不用写服务端 • Parse • LeanCloud(AVOS)
Q&A