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
170
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
160
PyCon2014China-Zhuhai-bpm.py
zoomquiet
0
130
PyCon2014China-Zhuhai-luna kv db
zoomquiet
0
100
PyCon2014China-Zhuhai-seed studio
zoomquiet
0
120
PyCon2014China-Zhuhai-Docker Registry Build By Python
zoomquiet
0
140
PyCon2014China-Zhuhai-jeff
zoomquiet
0
110
PyCon2014China-Zhuhai-pythonic front-end
zoomquiet
0
140
DevFest2014-Zhuhai-Polymer
zoomquiet
0
440
TEDxJLUZH MOMENT future
zoomquiet
0
400
Other Decks in Technology
See All in Technology
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
130
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
380
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
30万人の同時アクセスに耐えたい!新サービスの盤石なリリースを支える負荷試験 / SRE Kaigi 2026
genda
1
230
今日から始めるAmazon Bedrock AgentCore
har1101
4
380
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
320
Amazon Bedrock AgentCore 認証・認可入門
hironobuiga
2
500
生成AI時代にこそ求められるSRE / SRE for Gen AI era
ymotongpoo
5
2.5k
制約が導く迷わない設計 〜 信頼性と運用性を両立するマイナンバー管理システムの実践 〜
bwkw
2
830
10Xにおける品質保証活動の全体像と改善 #no_more_wait_for_test
nihonbuson
PRO
1
150
GitHub Issue Templates + Coding Agentで簡単みんなでIaC/Easy IaC for Everyone with GitHub Issue Templates + Coding Agent
aeonpeople
1
170
CDK対応したAWS DevOps Agentを試そう_20260201
masakiokuda
1
180
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
37
7.1k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
The SEO identity crisis: Don't let AI make you average
varn
0
64
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
62
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
97
Utilizing Notion as your number one productivity tool
mfonobong
2
210
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
GitHub's CSS Performance
jonrohan
1032
470k
HDC tutorial
michielstock
1
350
Technical Leadership for Architectural Decision Making
baasie
1
240
Optimising Largest Contentful Paint
csswizardry
37
3.6k
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