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
150
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
120
PyCon2014China-Zhuhai-bpm.py
zoomquiet
0
93
PyCon2014China-Zhuhai-luna kv db
zoomquiet
0
88
PyCon2014China-Zhuhai-seed studio
zoomquiet
0
79
PyCon2014China-Zhuhai-Docker Registry Build By Python
zoomquiet
0
92
PyCon2014China-Zhuhai-jeff
zoomquiet
0
72
PyCon2014China-Zhuhai-pythonic front-end
zoomquiet
0
99
DevFest2014-Zhuhai-Polymer
zoomquiet
0
390
TEDxJLUZH MOMENT future
zoomquiet
0
350
Other Decks in Technology
See All in Technology
白金鉱業Meetup_Vol.18_AIエージェント時代のUI/UX設計
brainpadpr
1
210
PostgreSQL Log File Mastery: Optimizing Database Performance Through Advanced Log Analysis
shiviyer007
PRO
1
140
持続可能なドキュメント運用のリアル: 1年間の成果とこれから
akitok_
1
220
Dynamic Reteaming And Self Organization
miholovesq
3
650
Aspire をカスタマイズしよう & Aspire 9.2
nenonaninu
0
180
QA/SDETの現在と、これからの挑戦
imtnd
0
150
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
1
310
Web Intelligence and Visual Media Analytics
weblyzard
PRO
1
5.9k
より良い開発者体験を実現するために~開発初心者が感じた生成AIの可能性~
masakiokuda
0
220
4/16/25 - SFJug - Java meets AI: Build LLM-Powered Apps with LangChain4j
edeandrea
PRO
2
130
地味にいろいろあった! 2025春のAmazon Bedrockアップデートおさらい
minorun365
PRO
1
480
クォータ監視、AWS Organizations環境でも楽勝です✌️
iwamot
PRO
1
340
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
400
Rebuilding a faster, lazier Slack
samanthasiow
81
8.9k
Adopting Sorbet at Scale
ufuk
76
9.3k
Building Adaptive Systems
keathley
41
2.5k
A Tale of Four Properties
chriscoyier
158
23k
Making the Leap to Tech Lead
cromwellryan
133
9.2k
Side Projects
sachag
453
42k
KATA
mclloyd
29
14k
How to Ace a Technical Interview
jacobian
276
23k
How to train your dragon (web standard)
notwaldorf
90
6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
135
33k
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