SlideShare a Scribd company logo
High-performance
                   Robust
                   HTTP
                   Front-ends


                           / tips, tricks and expectations



Saturday, April 23, 2011
Who am I? @postwait on twitter


                           Author of “Scalable Internet Architectures”
                           Pearson, ISBN: 067232699X

                           Contributor to “Web Operations”
                           O’Reilly, ISBN:



                           Founder of OmniTI, Message Systems, Fontdeck, & Circonus
                           I like to tackle problems that are “always on” and “always growing.”




                           I am an Engineer
                           A practitioner of academic computing.
                           IEEE member and Senior ACM member.
                           On the Editorial Board of ACM’s Queue magazine.



                                                         2
Saturday, April 23, 2011
Agenda




                      •    Why only HTTP?

                      •    HTTP-like protocols

                      •    Performance

                      •    Availability




Saturday, April 23, 2011
HTTP



                      •    Why only HTTP... it’s what we do.

                      •    User-based, immediate, short-lived
                           transactions occupy my life.


                      •    So, not just HTTP.

                           •   HTTPS

                           •   SPDY    (... we’ll get to this)




Saturday, April 23, 2011
Performance

                      •    ATS (Apache Traffic Server)
                           •   supports SSL

                           •   battle-hardened codebase

                           •   very multi-code capable

                      •    Varnish
                           •   VCL adds unparalleled flexibility

                           •   no SSL!

                      •    nginx
                           •   I don’t see much of this out on the edge


Saturday, April 23, 2011
Performance Expectations



                      •    from a single server, you should be able to:

                           •   support 500k concurrent users

                               •   this is only 40k sockets/core

                           •   push in excess of 100k requests/second

                               •   this is only 9k requests/core*second

                           •   push close to 10 gigabits

                               •   this is why 10G was invented



Saturday, April 23, 2011
Performance Achievements



                      •    Good load balancers achieve this performance

                      •    with dual socket Westmere processors,
                           we’re able to achieve in
                           software on
                           general purpose hardware
                           what was only possible in hardware ASICs.


                      •    ATS and Varnish can do this today.




Saturday, April 23, 2011
The Basic Rules: Content




                      •    You must serve content from cache

                      •    Your cache should fit in memory

                           •   If it does not, it should spill to SSD,
                               not spinning media.




Saturday, April 23, 2011
The Basic Rules: CPU


                      •    You must cache SSL sessions

                           •   SSL key negotiation is expensive.

                           •   SSL encryption is not*

                      •    Common cases must not cause state on the firewall.

                           •   It’s hard enough to serve 150k requests/second.

                           •   You will spend too much time in kernel in
                               iptables, ipf, or pf.

                           •   allow port 80 and port 443.

                           •   enable SYN flood prevention

           *   crypto obviously costs CPU; symmetric crypto is relatively cheap

Saturday, April 23, 2011
The Basic Rules: Network



                      •    You must not run a stateful firewall in front

                           •   too expensive

                           •   too little value

                      •    You must be directly behind capable router(s)

                           •   expect anywhere from
                               1MM to 20MM packets per second

                           •   we need to run BGP for availability




Saturday, April 23, 2011
Availability


                      •    We learned in the performance section:

                           •   1 machine / 10Gbps uplink performs well enough



                      •    We need redundancy:

                           •   Linux HA?

                           •   VRRP/HSRP?

                           •   CARP?

                           •   No...




Saturday, April 23, 2011
Availability: Constraints



                      •    Client TCP sessions are relatively short lived.

                      •    The web is a largely idempotent place.

                      •    Clients are capable of retrying on failure.



                      •    This means:

                           •   forget stateful failover.

                           •   focus on availability for new connections.




Saturday, April 23, 2011
Availability: Setup


                      •    You are behind a capable router (it was a rule)

                      •    Use routing protocols (BGP) to maintain availability.




                                                      BGP

                                  10.1.0.0/24                      10.1.1.0/24

                                        10.1.0.0/23         10.1.0.0/23




Saturday, April 23, 2011
Working Stacks




       •       Linux       (OS/TCP stack)   •   Illumos (OS/TCP stack)

       •       Varnish (HTTP)               •   ATS     (HTTP/HTTPS)

       •       Quagga (BGP)                 •   Quagga (BGP)



Saturday, April 23, 2011
Future!

                      •    This stuff is fast.

                      •    In the end, we’re not looking for faster servers,
                           we’re looking for improved user experience.



                      •    Enter SPDY

                           •   Google’s multi-channel HTTP super-protocol

                           •   Allows multiplexing of concurrent HTTP(like)
                               request/response on a single TCP session.

                           •   Defeats slow startup

                           •   Allows for content prioritization on server


Saturday, April 23, 2011
Future: my thoughts


                      •    SPDY is relatively simple to implement on the server

                      •    SPDY is very very hard to leverage on the server



                      •    If ATS implemented SPDY in and out

                           •   and provided a robust configuration language
                               to leverage it



                               ... the future would be today.




Saturday, April 23, 2011
Thank you.


                      •    Thank you Олег Бунин

                      •    Thanks to the Varnish and ATS developers.


                      •    Спасибо.




Saturday, April 23, 2011

More Related Content

PDF
Designing for Massive Scalability at BackType #bigdatacamp
PDF
WHIP WebRTC Broadcasting @ FOSDEM 2022
PDF
FOSDEM2018 Janus Lua plugin presentation
PDF
Janus + Audio @ Open Source World
PDF
How to video.
PDF
Multistream in Janus @ CommCon 2019
PDF
Stackato v2
PDF
An SFU/MCU integration for heterogeneous environments
Designing for Massive Scalability at BackType #bigdatacamp
WHIP WebRTC Broadcasting @ FOSDEM 2022
FOSDEM2018 Janus Lua plugin presentation
Janus + Audio @ Open Source World
How to video.
Multistream in Janus @ CommCon 2019
Stackato v2
An SFU/MCU integration for heterogeneous environments

What's hot (20)

PDF
Persistent storage tailored for containers #dockersummit
PPTX
What’s the Deal with Containers, Anyway?
PDF
OSGi In Anger - Tara Simpson
PDF
Highly concurrent yet natural programming
PPTX
Building the carrier grade nfv infrastructure
PDF
Docker volume plugins and Infinit – Mini-conf Docker Paris #1
PDF
PPTX
A tour of Java and the JVM
PDF
Dist::Zilla - A very brief introduction
PDF
Balázs Bucsay - XFLTReaT: Building a Tunnel
PPTX
Networking in the cloud: An SDN primer
PDF
Improving POD Usage in Labs, CI and Testing
PPTX
Realtime traffic analyser
PPTX
Breaking down a monolith
PDF
2012 workshop wed_ethernet_servicesoveri_poib
PPTX
RabbitMQ and AMQP Model
PDF
Iwmn architecture
PDF
Adding Real-time Features to PHP Applications
PPT
All About IPv6
PDF
Report on OFELIA
Persistent storage tailored for containers #dockersummit
What’s the Deal with Containers, Anyway?
OSGi In Anger - Tara Simpson
Highly concurrent yet natural programming
Building the carrier grade nfv infrastructure
Docker volume plugins and Infinit – Mini-conf Docker Paris #1
A tour of Java and the JVM
Dist::Zilla - A very brief introduction
Balázs Bucsay - XFLTReaT: Building a Tunnel
Networking in the cloud: An SDN primer
Improving POD Usage in Labs, CI and Testing
Realtime traffic analyser
Breaking down a monolith
2012 workshop wed_ethernet_servicesoveri_poib
RabbitMQ and AMQP Model
Iwmn architecture
Adding Real-time Features to PHP Applications
All About IPv6
Report on OFELIA
Ad

Viewers also liked (9)

PDF
The CMO 2.0
PPTX
Social Media Benchmarking Report - preview of findings
PDF
How digital can build your brand
PPT
How to get value from your multi-channel lead gen programme - Cyance
PDF
인간의 경험 공유를 위한 태스크 및 컨텍스트 추출 및 표현
PPTX
What makes excellent B2B Marketing? The Evidence Uncovered
PDF
Cappuccino 3 Slide Illustration
PDF
CASE STUDY: Inbound: building trust into your marketing strategy
PDF
модульное тестирование для Perl. алексей шруб. зал 4
The CMO 2.0
Social Media Benchmarking Report - preview of findings
How digital can build your brand
How to get value from your multi-channel lead gen programme - Cyance
인간의 경험 공유를 위한 태스크 및 컨텍스트 추출 및 표현
What makes excellent B2B Marketing? The Evidence Uncovered
Cappuccino 3 Slide Illustration
CASE STUDY: Inbound: building trust into your marketing strategy
модульное тестирование для Perl. алексей шруб. зал 4
Ad

Similar to Building high traffic http front-ends. theo schlossnagle. зал 1 (20)

PDF
NFV Infrastructure Manager with High Performance Software Switch Lagopus
PDF
Stardog talk-dc-march-17
PPTX
Realtime web2012
PDF
How DreamHost builds a Public Cloud with OpenStack
PDF
How DreamHost builds a public cloud with OpenStack.pdf
KEY
Actors and Threads
PDF
Trick or XFLTReaT a.k.a. Tunnel All The Things
PDF
Xen and-the-art-of-rails-deployment2640
PDF
Xen and-the-art-of-rails-deployment2640
PDF
Xen and-the-art-of-rails-deployment2640
PDF
Xen and-the-art-of-rails-deployment2640
PDF
Xen and-the-art-of-rails-deployment2640
KEY
Ruby Concurrency Realities
PPTX
Ext osad initial-eval-march2015
PDF
XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)
PDF
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
KEY
Real time system_performance_mon
KEY
High performance network programming on the jvm oscon 2012
PDF
XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)
NFV Infrastructure Manager with High Performance Software Switch Lagopus
Stardog talk-dc-march-17
Realtime web2012
How DreamHost builds a Public Cloud with OpenStack
How DreamHost builds a public cloud with OpenStack.pdf
Actors and Threads
Trick or XFLTReaT a.k.a. Tunnel All The Things
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
Ruby Concurrency Realities
Ext osad initial-eval-march2015
XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
Real time system_performance_mon
High performance network programming on the jvm oscon 2012
XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)

More from rit2011 (20)

PPT
классификация Ddos. александр лямин, артем гавриченков. зал 2
PDF
Chef. кто на кухне хозяин. концепция devops. а,титов. зал 2
PPT
как объяснить заказчику, что он не прав. денис тучин. зал 3
PDF
классификация Ddos. александр лямин, артем гавриченков. зал 2
PPTX
Kpi разработчика vs kpi разработки. евгения фирсова. зал 1
PDF
ускорение Front end разработки с помощью haml, sass и compass. андрей ситник....
PDF
ускорение Front end разработки с помощью haml, sass и compass. андрей ситник....
PPT
что и почему вы должны программировать на Erlang.максим лапшин. зал 4
PDF
I pv6 малоизвестные подробности. андрей пантюхин. зал 2
PPT
безопасность веб приложений сегодня. дмитрий евтеев. зал 4
PDF
как стать хорошим веб технологом. нарек мкртчян. зал 4
PPTX
сотни серверов, десятки компонент. автоматизация раскладки и конфигурирования...
PPT
выращиваем интерфейс своими руками. ольга павлова. зал 3
PDF
распределенное файловое хранилище (Nginx, zfs, perl). перепелица мамонтов. зал 2
PPT
от Flash к html5. александр бацуев. зал 4
PPTX
Ie9 и ie10. алекс могилевский. зал 2
PPTX
сотни серверов, десятки компонент. автоматизация раскладки и конфигурирования...
PDF
полмиллиона юзеров в онлайне без падений оптимизация высоконагруженной Server...
POTX
рисуем тз. эффективный способ коммуникации в веб проектах. артем вольфтруб. з...
PPTX
типология личности и прогноз отношений по а. афанасьеву. сергей котырев. зал 2
классификация Ddos. александр лямин, артем гавриченков. зал 2
Chef. кто на кухне хозяин. концепция devops. а,титов. зал 2
как объяснить заказчику, что он не прав. денис тучин. зал 3
классификация Ddos. александр лямин, артем гавриченков. зал 2
Kpi разработчика vs kpi разработки. евгения фирсова. зал 1
ускорение Front end разработки с помощью haml, sass и compass. андрей ситник....
ускорение Front end разработки с помощью haml, sass и compass. андрей ситник....
что и почему вы должны программировать на Erlang.максим лапшин. зал 4
I pv6 малоизвестные подробности. андрей пантюхин. зал 2
безопасность веб приложений сегодня. дмитрий евтеев. зал 4
как стать хорошим веб технологом. нарек мкртчян. зал 4
сотни серверов, десятки компонент. автоматизация раскладки и конфигурирования...
выращиваем интерфейс своими руками. ольга павлова. зал 3
распределенное файловое хранилище (Nginx, zfs, perl). перепелица мамонтов. зал 2
от Flash к html5. александр бацуев. зал 4
Ie9 и ie10. алекс могилевский. зал 2
сотни серверов, десятки компонент. автоматизация раскладки и конфигурирования...
полмиллиона юзеров в онлайне без падений оптимизация высоконагруженной Server...
рисуем тз. эффективный способ коммуникации в веб проектах. артем вольфтруб. з...
типология личности и прогноз отношений по а. афанасьеву. сергей котырев. зал 2

Recently uploaded (20)

PDF
KodekX | Application Modernization Development
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Cloud computing and distributed systems.
PDF
Encapsulation theory and applications.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
cuic standard and advanced reporting.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Understanding_Digital_Forensics_Presentation.pptx
KodekX | Application Modernization Development
Dropbox Q2 2025 Financial Results & Investor Presentation
Cloud computing and distributed systems.
Encapsulation theory and applications.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Network Security Unit 5.pdf for BCA BBA.
Advanced methodologies resolving dimensionality complications for autism neur...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation_ Review paper, used for researhc scholars
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Unlocking AI with Model Context Protocol (MCP)
Programs and apps: productivity, graphics, security and other tools
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
20250228 LYD VKU AI Blended-Learning.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
cuic standard and advanced reporting.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Spectral efficient network and resource selection model in 5G networks
Understanding_Digital_Forensics_Presentation.pptx

Building high traffic http front-ends. theo schlossnagle. зал 1

  • 1. High-performance Robust HTTP Front-ends / tips, tricks and expectations Saturday, April 23, 2011
  • 2. Who am I? @postwait on twitter Author of “Scalable Internet Architectures” Pearson, ISBN: 067232699X Contributor to “Web Operations” O’Reilly, ISBN: Founder of OmniTI, Message Systems, Fontdeck, & Circonus I like to tackle problems that are “always on” and “always growing.” I am an Engineer A practitioner of academic computing. IEEE member and Senior ACM member. On the Editorial Board of ACM’s Queue magazine. 2 Saturday, April 23, 2011
  • 3. Agenda • Why only HTTP? • HTTP-like protocols • Performance • Availability Saturday, April 23, 2011
  • 4. HTTP • Why only HTTP... it’s what we do. • User-based, immediate, short-lived transactions occupy my life. • So, not just HTTP. • HTTPS • SPDY (... we’ll get to this) Saturday, April 23, 2011
  • 5. Performance • ATS (Apache Traffic Server) • supports SSL • battle-hardened codebase • very multi-code capable • Varnish • VCL adds unparalleled flexibility • no SSL! • nginx • I don’t see much of this out on the edge Saturday, April 23, 2011
  • 6. Performance Expectations • from a single server, you should be able to: • support 500k concurrent users • this is only 40k sockets/core • push in excess of 100k requests/second • this is only 9k requests/core*second • push close to 10 gigabits • this is why 10G was invented Saturday, April 23, 2011
  • 7. Performance Achievements • Good load balancers achieve this performance • with dual socket Westmere processors, we’re able to achieve in software on general purpose hardware what was only possible in hardware ASICs. • ATS and Varnish can do this today. Saturday, April 23, 2011
  • 8. The Basic Rules: Content • You must serve content from cache • Your cache should fit in memory • If it does not, it should spill to SSD, not spinning media. Saturday, April 23, 2011
  • 9. The Basic Rules: CPU • You must cache SSL sessions • SSL key negotiation is expensive. • SSL encryption is not* • Common cases must not cause state on the firewall. • It’s hard enough to serve 150k requests/second. • You will spend too much time in kernel in iptables, ipf, or pf. • allow port 80 and port 443. • enable SYN flood prevention * crypto obviously costs CPU; symmetric crypto is relatively cheap Saturday, April 23, 2011
  • 10. The Basic Rules: Network • You must not run a stateful firewall in front • too expensive • too little value • You must be directly behind capable router(s) • expect anywhere from 1MM to 20MM packets per second • we need to run BGP for availability Saturday, April 23, 2011
  • 11. Availability • We learned in the performance section: • 1 machine / 10Gbps uplink performs well enough • We need redundancy: • Linux HA? • VRRP/HSRP? • CARP? • No... Saturday, April 23, 2011
  • 12. Availability: Constraints • Client TCP sessions are relatively short lived. • The web is a largely idempotent place. • Clients are capable of retrying on failure. • This means: • forget stateful failover. • focus on availability for new connections. Saturday, April 23, 2011
  • 13. Availability: Setup • You are behind a capable router (it was a rule) • Use routing protocols (BGP) to maintain availability. BGP 10.1.0.0/24 10.1.1.0/24 10.1.0.0/23 10.1.0.0/23 Saturday, April 23, 2011
  • 14. Working Stacks • Linux (OS/TCP stack) • Illumos (OS/TCP stack) • Varnish (HTTP) • ATS (HTTP/HTTPS) • Quagga (BGP) • Quagga (BGP) Saturday, April 23, 2011
  • 15. Future! • This stuff is fast. • In the end, we’re not looking for faster servers, we’re looking for improved user experience. • Enter SPDY • Google’s multi-channel HTTP super-protocol • Allows multiplexing of concurrent HTTP(like) request/response on a single TCP session. • Defeats slow startup • Allows for content prioritization on server Saturday, April 23, 2011
  • 16. Future: my thoughts • SPDY is relatively simple to implement on the server • SPDY is very very hard to leverage on the server • If ATS implemented SPDY in and out • and provided a robust configuration language to leverage it ... the future would be today. Saturday, April 23, 2011
  • 17. Thank you. • Thank you Олег Бунин • Thanks to the Varnish and ATS developers. • Спасибо. Saturday, April 23, 2011