SlideShare ist ein Scribd-Unternehmen logo
1 von 47
Out and About with Apache
       Traffic Server


Leif Hedstrom
November 2011
Who am I?
• One of the drivers to open source Traffic
  Server (at Yahoo)
• Committer for Apache Traffic Server
• VP of Apache Traffic Server PMC
• ASF member
• Go Daddy’s Principal Architect for Hosting

                   zwoop@apache.org
                    @zwoop
                    +zwoop
History of Traffic Server


          Inkt omi          Yahoo            A pache
       T raffic Server   T raffic Server   T raffic Server




1995           2000         2005             2010
Plenty of FOSS Proxy Servers
Features
                   ATS    HAproxy   ngin   Squid    Varnish    mod_proxy
                                     x
Worker Threads      Y       N        N      N         Y           Y
Multi-Process       N       Y        Y      N         Y           Y
Event-driven        Y       Y        Y      Y      sometimes      Y
Plugin APIs         Y       N        Y     part       Y           Y
Forward Proxy       Y       N        N      Y         N           Y
Reverse Proxy       Y       Y        Y      Y         Y           Y
Transp. Proxy       Y       Y        N      Y         N           N
Load Balancer      weak     Y        Y      Y         Y           Y
Persistent Cache    Y       N        Y      Y        sorta        Y
ESI                 Y       N        N      Y        kinda        N
ICP                 Y       N        N      Y         N           N
Keep-Alive          Y       N        Y      Y         Y           Y
SSL                 Y       N        Y      Y         N           Y
Pipeline            Y       N        Y      Y         N           Y
Mandatory useless benchmark …

              120,000

              100,000

               80,000
 Throughput




               60,000

               40,000

               20,000

                   0
                        ATS 2.1.9       Nginx 0.8.53   Varnish 2.1.5

                                    Req / sec
Less useless benchmark …
             120,000                                                       4.0
                                                                           3.5
             100,000




                                                                                 Time to firt res p onse
                                                                           3.0
              80,000
Throughput




                                                                           2.5
              60,000                                                       2.0




                                                                                       s
                                                                           1.5
              40,000
                                                                           1.0
              20,000
                                                                           0.5
                  0                                                        0.0
                       ATS 2.1.9          Nginx 0.8.53     Varnish 2.1.5

                                   Req / sec      Latency (ms)
Intermediaries - Forward Proxy
Intermediaries - Reverse Proxy
Intermediaries - Intercepting Proxy
Common enemies of performance

3-Way handshake

     Congestion control

            DNS lookups
Common enemies of performance

3-Way handshake
TCP 3-way Handshake
Common enemies of performance




     Congestion control
Congestion control
Common enemies of performance




            DNS lookups
http://news.example.com/
http://finance.example.com/
http://groups.example.com/
vs
http://www.example.com/news
http://www.example.com/finance
http://www.example.com/groups
The concurrency problem
Solution 1: Multithreading

       Single CPU               Dual CPU

       Thread 1            Thread 1        Thread 2

                                             Thread 3
            Thread 2
                           Thread 1

              Thread 3
                                Thread 3
       Thread 1



              Thread 3




     Time                Time
Problems with multi-threading


      "When two trains approach each other at a
       crossing, both shall come to a full stop
        and neither shall start up again until
                the other has gone."

      From Wikipedia, Illogical statute passed by Kansas legislation .
Solution 2: Event Processing
         Scheduled        Network       Disk I/O
          events           events       events




                           Queue




                        Event
                        Loop

         Disk            HTTP state         Accept
        handler           machine           handler




                  Can generate new events
Problems with event processors
Asynchronous event processor

                                   Asynchronous event processor




   RAM cache
                                               ...
                                                                  n threads per core




                                   Asynchronous event processor




   Disk cache
                                          Disk I/O thread

                                          Disk I/O thread
                                               ...
                                                                  m threads per disk




                                          Disk I/O thread
                Shared Resources

 Configs
Reloadable




                                     Accept threads (per port)

                                         Logging threads
                                                                                       Traffic Server threads model




   etc.
Stats, logs
                                                                        ~10 threads




                                      Various "admin" threads
http://www.flickr.com/photos/stuartpilbrow/3345896050/
plugin.config      ip_allow.config
records.config     storage.config
partition.config   logs_xml.config
hosting.config     parent.config
cache.config       remap.config
update.config      icp.config
records.config for reverse proxy
CONFIG proxy.config.http.server_port INT 80
CONFIG proxy.config.cache.ram_cache.size INT 1G
CONFIG proxy.config.cache.ram_cache_cutoff INT 1M
CONFIG proxy.config.reverse_proxy.enabled INT 1
CONFIG proxy.config.url_remap.remap_required INT 1
CONFIG proxy.config.url_remap.pristine_host_hdr INT 0
CONFIG proxy.config.http.negative_caching_enabled INT 1
CONFIG proxy.config.http.negative_caching_lifetime INT 120
CONFIG proxy.config.http.cache.ignore_client_cc_max_age
INT 1
CONFIG proxy.config.http.normalize_ae_gzip INT 1
records.config for reverse proxy
CONFIG proxy.config.http.server_port INT 80



CONFIG proxy.config.reverse_proxy.enabled INT 1
CONFIG proxy.config.url_remap.remap_required INT 1
records.config for forward proxy
CONFIG proxy.config.http.server_port INT 8080



CONFIG proxy.config.reverse_proxy.enabled INT 0
CONFIG proxy.config.url_remap.remap_required INT 0
remap.config examples
map http://www.example.com/css http://css.example.com
map http://www.example.com http://real.example.com
reverse_map http://real.example.com http://www.example.com

redirect http://example.com http://www.example.com

regex_map http://(.*).example.com http://o.example.com/$1

map / http://kitchensink.example.com
remap.config examples
map http://www.example.com/css http://css.example.com
map http://www.example.com http://real.example.com
remap.config examples


reverse_map http://real.example.com http://www.example.com
remap.config examples




regex_map http://(.*).example.com http://o.example.com/$1
remap.config examples




map / http://kitchensink.example.com
Some interesting features
RAM: Optional compression
 –Various compression levels supported
 –Very fast (virtually no overhead using the faster algo)
RAM: Several cache eviction algorithms
 –CLFUS algorithm avoids the classic problem on an LRU
  during “scans”
  ▫ And it’s not encumbered by any patents
Disk: Supports various block sizes (SSD)
Disk: Can be tuned for various object sizes
Disk: No file system overhead (RAW disks)
Future directions
Release early, and often
Full IPv6 support
NPN, SNI and other SSL improvements
Improved memory management, support
 debug features in e.g. jemalloc and tcmalloc
Optimizations for SSD (“stacked” caches)
More focus on plugins, and plugin APIs
 –Hopefully a real load balancer plugin!
Was this a huge waste of time, or?
A versatile tool




                   39
Yes, it’s fast, ridiculously fast




                                    40
A vibrant community!




            The
                  Apache
Software Foundation
http://www.apache.org/



                         41
“If you are not using SSDs, you are
wasting your life”
     Artur Bergman




                                      42
“If you are not using a caching proxy
server, you are wasting your SSDs”
      me




                                        43
44
Four Horseman of Bad Performance
–Data copies
–Context Switches
–Memory allocation
–Lock contention




–Avoid these!

                 http://pl.atyp.us/content/tech/servers.html
records.config for reverse proxy




CONFIG proxy.config.http.cache.ignore_client_cc_max_age
INT 1
CONFIG proxy.config.http.normalize_ae_gzip INT 1
Disk cache: “Cyclone”

Weitere ähnliche Inhalte

Was ist angesagt?

SD, a P2P bug tracking system
SD, a P2P bug tracking systemSD, a P2P bug tracking system
SD, a P2P bug tracking systemJesse Vincent
 
How to test code with mruby
How to test code with mrubyHow to test code with mruby
How to test code with mrubyHiroshi SHIBATA
 
Jvm Performance Tunning
Jvm Performance TunningJvm Performance Tunning
Jvm Performance Tunningguest1f2740
 
When Ruby Meets Java - The Power of Torquebox
When Ruby Meets Java - The Power of TorqueboxWhen Ruby Meets Java - The Power of Torquebox
When Ruby Meets Java - The Power of Torqueboxrockyjaiswal
 
초보자를 위한 분산 캐시 이야기
초보자를 위한 분산 캐시 이야기초보자를 위한 분산 캐시 이야기
초보자를 위한 분산 캐시 이야기OnGameServer
 
Large-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 MinutesLarge-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 MinutesHiroshi SHIBATA
 
How Prometheus Store the Data
How Prometheus Store the DataHow Prometheus Store the Data
How Prometheus Store the DataHao Chen
 
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLabIntroduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLabCloudxLab
 
Acus08 Advanced Load Balancing Apache2.2
Acus08 Advanced Load Balancing Apache2.2Acus08 Advanced Load Balancing Apache2.2
Acus08 Advanced Load Balancing Apache2.2Jim Jagielski
 
DBD::Gofer 200809
DBD::Gofer 200809DBD::Gofer 200809
DBD::Gofer 200809Tim Bunce
 
Practicing Continuous Deployment
Practicing Continuous DeploymentPracticing Continuous Deployment
Practicing Continuous Deploymentzeeg
 
DataMapper on Infinispan
DataMapper on InfinispanDataMapper on Infinispan
DataMapper on InfinispanLance Ball
 
Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
Using Node.js to  Build Great  Streaming Services - HTML5 Dev ConfUsing Node.js to  Build Great  Streaming Services - HTML5 Dev Conf
Using Node.js to Build Great Streaming Services - HTML5 Dev ConfTom Croucher
 
2014 OSDC Talk: Introduction to Percona XtraDB Cluster and HAProxy
2014 OSDC Talk: Introduction to Percona XtraDB Cluster and HAProxy2014 OSDC Talk: Introduction to Percona XtraDB Cluster and HAProxy
2014 OSDC Talk: Introduction to Percona XtraDB Cluster and HAProxyBo-Yi Wu
 

Was ist angesagt? (20)

SD, a P2P bug tracking system
SD, a P2P bug tracking systemSD, a P2P bug tracking system
SD, a P2P bug tracking system
 
How to test code with mruby
How to test code with mrubyHow to test code with mruby
How to test code with mruby
 
Jvm Performance Tunning
Jvm Performance TunningJvm Performance Tunning
Jvm Performance Tunning
 
Docker.io
Docker.ioDocker.io
Docker.io
 
When Ruby Meets Java - The Power of Torquebox
When Ruby Meets Java - The Power of TorqueboxWhen Ruby Meets Java - The Power of Torquebox
When Ruby Meets Java - The Power of Torquebox
 
Memcached Study
Memcached StudyMemcached Study
Memcached Study
 
Varnish 4 cool features
Varnish 4 cool featuresVarnish 4 cool features
Varnish 4 cool features
 
초보자를 위한 분산 캐시 이야기
초보자를 위한 분산 캐시 이야기초보자를 위한 분산 캐시 이야기
초보자를 위한 분산 캐시 이야기
 
Large-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 MinutesLarge-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 Minutes
 
Ruby 2.4 Internals
Ruby 2.4 InternalsRuby 2.4 Internals
Ruby 2.4 Internals
 
How Prometheus Store the Data
How Prometheus Store the DataHow Prometheus Store the Data
How Prometheus Store the Data
 
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLabIntroduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
 
Acus08 Advanced Load Balancing Apache2.2
Acus08 Advanced Load Balancing Apache2.2Acus08 Advanced Load Balancing Apache2.2
Acus08 Advanced Load Balancing Apache2.2
 
DBD::Gofer 200809
DBD::Gofer 200809DBD::Gofer 200809
DBD::Gofer 200809
 
Practicing Continuous Deployment
Practicing Continuous DeploymentPracticing Continuous Deployment
Practicing Continuous Deployment
 
DataMapper on Infinispan
DataMapper on InfinispanDataMapper on Infinispan
DataMapper on Infinispan
 
Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
Using Node.js to  Build Great  Streaming Services - HTML5 Dev ConfUsing Node.js to  Build Great  Streaming Services - HTML5 Dev Conf
Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
 
2014 OSDC Talk: Introduction to Percona XtraDB Cluster and HAProxy
2014 OSDC Talk: Introduction to Percona XtraDB Cluster and HAProxy2014 OSDC Talk: Introduction to Percona XtraDB Cluster and HAProxy
2014 OSDC Talk: Introduction to Percona XtraDB Cluster and HAProxy
 
Railsconf
RailsconfRailsconf
Railsconf
 
Message queueing
Message queueingMessage queueing
Message queueing
 

Andere mochten auch

Introduction to karen bloomfield
Introduction to karen bloomfieldIntroduction to karen bloomfield
Introduction to karen bloomfieldKaren Bloomfield
 
Traffic Server を使ってみた
Traffic Server を使ってみたTraffic Server を使ってみた
Traffic Server を使ってみたKazutoshi Fujimoto
 
Traffic server overview
Traffic server overviewTraffic server overview
Traffic server overviewqianshi
 
Apache Traffic Server
Apache Traffic ServerApache Traffic Server
Apache Traffic Serversupertom
 

Andere mochten auch (8)

Introduction to karen bloomfield
Introduction to karen bloomfieldIntroduction to karen bloomfield
Introduction to karen bloomfield
 
Rit 2011 ats
Rit 2011 atsRit 2011 ats
Rit 2011 ats
 
Velocity 2010 - ATS
Velocity 2010 - ATSVelocity 2010 - ATS
Velocity 2010 - ATS
 
Traffic Server を使ってみた
Traffic Server を使ってみたTraffic Server を使ってみた
Traffic Server を使ってみた
 
Traffic server overview
Traffic server overviewTraffic server overview
Traffic server overview
 
Oscon 2010 - ATS
Oscon 2010 - ATSOscon 2010 - ATS
Oscon 2010 - ATS
 
Apache Traffic Server
Apache Traffic ServerApache Traffic Server
Apache Traffic Server
 
Metro presentation
Metro presentationMetro presentation
Metro presentation
 

Ähnlich wie Apache con 2011 gd

Varnish, The Good, The Awesome, and the Downright Crazy.
Varnish, The Good, The Awesome, and the Downright Crazy.Varnish, The Good, The Awesome, and the Downright Crazy.
Varnish, The Good, The Awesome, and the Downright Crazy.Mike Willbanks
 
Varnish, The Good, The Awesome, and the Downright Crazy
Varnish, The Good, The Awesome, and the Downright CrazyVarnish, The Good, The Awesome, and the Downright Crazy
Varnish, The Good, The Awesome, and the Downright CrazyMike Willbanks
 
Usenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyUsenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyLeif Hedstrom
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - DeploymentFabio Akita
 
Varnish Cache - International PHP Conference Fall 2012
Varnish Cache - International PHP Conference Fall 2012Varnish Cache - International PHP Conference Fall 2012
Varnish Cache - International PHP Conference Fall 2012Mike Willbanks
 
Asynchronous Architectures for Implementing Scalable Cloud Services - Evan Co...
Asynchronous Architectures for Implementing Scalable Cloud Services - Evan Co...Asynchronous Architectures for Implementing Scalable Cloud Services - Evan Co...
Asynchronous Architectures for Implementing Scalable Cloud Services - Evan Co...Twilio Inc
 
Non-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsNon-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsMarcus Frödin
 
vert.x - asynchronous event-driven web applications on the JVM
vert.x - asynchronous event-driven web applications on the JVMvert.x - asynchronous event-driven web applications on the JVM
vert.x - asynchronous event-driven web applications on the JVMjbandi
 
Supercharging Cassandra - GOTO Amsterdam
Supercharging Cassandra - GOTO AmsterdamSupercharging Cassandra - GOTO Amsterdam
Supercharging Cassandra - GOTO AmsterdamAcunu
 
Everyday tools and tricks for scaling Node.js
Everyday tools and tricks for scaling Node.jsEveryday tools and tricks for scaling Node.js
Everyday tools and tricks for scaling Node.jsNikolay Stoitsev
 
Embrace NoSQL and Eventual Consistency with Ripple
Embrace NoSQL and Eventual Consistency with RippleEmbrace NoSQL and Eventual Consistency with Ripple
Embrace NoSQL and Eventual Consistency with RippleSean Cribbs
 
Reactive Summit 2017 Highlights!
Reactive Summit 2017 Highlights!Reactive Summit 2017 Highlights!
Reactive Summit 2017 Highlights!Fabio Tiriticco
 
Virtual Network Performance Challenge
Virtual Network Performance ChallengeVirtual Network Performance Challenge
Virtual Network Performance ChallengeStephen Hemminger
 
2010-04-13 Reactor Pattern & Event Driven Programming 2
2010-04-13 Reactor Pattern & Event Driven Programming 22010-04-13 Reactor Pattern & Event Driven Programming 2
2010-04-13 Reactor Pattern & Event Driven Programming 2Lin Jen-Shin
 
2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven Programming2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven ProgrammingLin Jen-Shin
 
Open stack in sina
Open stack in sinaOpen stack in sina
Open stack in sinaHui Cheng
 

Ähnlich wie Apache con 2011 gd (20)

Varnish Cache
Varnish CacheVarnish Cache
Varnish Cache
 
Varnish, The Good, The Awesome, and the Downright Crazy.
Varnish, The Good, The Awesome, and the Downright Crazy.Varnish, The Good, The Awesome, and the Downright Crazy.
Varnish, The Good, The Awesome, and the Downright Crazy.
 
Varnish, The Good, The Awesome, and the Downright Crazy
Varnish, The Good, The Awesome, and the Downright CrazyVarnish, The Good, The Awesome, and the Downright Crazy
Varnish, The Good, The Awesome, and the Downright Crazy
 
Usenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyUsenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a Proxy
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
 
Varnish Cache - International PHP Conference Fall 2012
Varnish Cache - International PHP Conference Fall 2012Varnish Cache - International PHP Conference Fall 2012
Varnish Cache - International PHP Conference Fall 2012
 
Deployment de Rails
Deployment de RailsDeployment de Rails
Deployment de Rails
 
Asynchronous Architectures for Implementing Scalable Cloud Services - Evan Co...
Asynchronous Architectures for Implementing Scalable Cloud Services - Evan Co...Asynchronous Architectures for Implementing Scalable Cloud Services - Evan Co...
Asynchronous Architectures for Implementing Scalable Cloud Services - Evan Co...
 
Cold Hard Cache
Cold Hard CacheCold Hard Cache
Cold Hard Cache
 
Non-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsNon-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.js
 
vert.x - asynchronous event-driven web applications on the JVM
vert.x - asynchronous event-driven web applications on the JVMvert.x - asynchronous event-driven web applications on the JVM
vert.x - asynchronous event-driven web applications on the JVM
 
Optimizing wordpress
Optimizing wordpressOptimizing wordpress
Optimizing wordpress
 
Supercharging Cassandra - GOTO Amsterdam
Supercharging Cassandra - GOTO AmsterdamSupercharging Cassandra - GOTO Amsterdam
Supercharging Cassandra - GOTO Amsterdam
 
Everyday tools and tricks for scaling Node.js
Everyday tools and tricks for scaling Node.jsEveryday tools and tricks for scaling Node.js
Everyday tools and tricks for scaling Node.js
 
Embrace NoSQL and Eventual Consistency with Ripple
Embrace NoSQL and Eventual Consistency with RippleEmbrace NoSQL and Eventual Consistency with Ripple
Embrace NoSQL and Eventual Consistency with Ripple
 
Reactive Summit 2017 Highlights!
Reactive Summit 2017 Highlights!Reactive Summit 2017 Highlights!
Reactive Summit 2017 Highlights!
 
Virtual Network Performance Challenge
Virtual Network Performance ChallengeVirtual Network Performance Challenge
Virtual Network Performance Challenge
 
2010-04-13 Reactor Pattern & Event Driven Programming 2
2010-04-13 Reactor Pattern & Event Driven Programming 22010-04-13 Reactor Pattern & Event Driven Programming 2
2010-04-13 Reactor Pattern & Event Driven Programming 2
 
2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven Programming2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven Programming
 
Open stack in sina
Open stack in sinaOpen stack in sina
Open stack in sina
 

Kürzlich hochgeladen

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Kürzlich hochgeladen (20)

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

Apache con 2011 gd

Hinweis der Redaktion

  1. Worked on Traffic Server both at Yahoo, and at Apache.Before we go on, lets do a show of hands. How many have or are using a Proxy server of some sort?How many of you are or were using Squid ?There’s still hope for you.
  2. Traffic Server started as a commercial product, developed and sold by Inktomi way back in the days Yahoo! Acquired Inktomi in 2003, and the software was shelved. Yahoo! needed a reverse proxy to build their own CDN, and as we all know, Squid sucks. So, we took ATS off the shelves again, and made it run on our RHEL distros. In 2009, Y! donated the Traffic Server source code to the Apache Software Foundation. In April of 2010, Apache Traffic Server became a TLP.
  3. Traffic Server is obviously not the only HTTP intermediary in the Open Source community. Existing servers include Apache mod_proxy, Squid, NGINX, Varnish and Haproxy. This makes the task of choosing a Proxy server an interesting, but challenging task. You really need to understand your problem space, your requirements, and any restrictions (like, budget). Easy for me to pick, but lets discuss some of the considerations you should take.
  4. I hate this slide, because by the time I do the presentation, this table is already wrong, and you can bet that someone in the audience will point it out! So, please look at this for the next 10 seconds, and then come to me after the presentation and complain.
  5. The point here is that performance of modern proxy servers is already ridiculous. Other things are more important, such as latency, or features.
  6. The point here is that performance of modern proxy servers is already ridiculous. Other things are more important, such as latency, or features.
  7. * Before we go into details of what drives Traffic Server, and how we use it, let me briefly discuss the three most common proxy server configurations.* In a forward proxy, the web browser has to be manually (or via auto-PAC files etc.) configured to use a proxy server for all (or some) requests. The browser typically sends the “full” URL as part of the GET request.The forward proxy typically is not required to be configured for “allowed” destination addresses, but can be configured with Access Control List, or blacklists controlling what requests are allowed, and by whom. A forward proxy is typically allowed to cache content, and a common use case scenario is inside corporate firewalls.
  8. A reverse proxy, aka a web accelerator, does not require the browser to cooperate in any special way. As far as the user (browser) is concerned, it looks like it’s talking to any other HTTP web server on the internet. The reverse proxy server on the other hand must be explicitly configured for what traffic it should handle, and how such requests are properly routed to the backend servers (aka. Origin Servers). Just as with a forward proxy, many reverse proxies are configured to cache content locally. It can also help load balancing and redundancy on the Origin Servers, and help solve difficult problems like Ajax routing.
  9. An intercepting proxy, also commonly called a transparent proxy, is very similar to a forward proxy, except the client (browser) does not require any special configuration. As far as the user is concerned, the proxying happens completely transparently. A transparent proxy will intercerpt the HTTP requests, modify them accordingly, and typically “forge” the source IP before forwarding the request to the final destination. Transparent proxies usually also implements traffic filters and monitoring, allowing for strict control of what HTTP traffic passes through the mandatory proxy layer. Typical use cases include ISPs and very strictly controlled corporate firewalls. I’m very excited to announce that as of a few days ago, code for transparent proxy is available in the subversion tree.
  10. Before we go into the next use case scenario, lets discuss a couple of common problems that can severely affect your web sites performance.There are several reasons why a Web page might be slow to render, three common problems that I personally have to deal with are TCP 3-way handshake, TCP congestion control, and DNS lookups. We’ll discuss the first two here, and explain what we’ve done at Yahoo! using Traffic Server to alleviate these two problems.
  11. Before we go into the next use case scenario, lets discuss a couple of common problems that can severely affect your web sites performance.There are several reasons why a Web page might be slow to render, three common problems that I personally have to deal with are TCP 3-way handshake, TCP congestion control, and DNS lookups. We’ll discuss the first two here, and explain what we’ve done at Yahoo! using Traffic Server to alleviate these two problems.
  12. In TCP, every new connection has to go through a setup phase, typically referred to as the 3-way handshake. As you can see from the picture above, this means that there’s a full round-trip worth of latency before the client can even send the first HTTP request to the server. Since latency introduced by 3-way handshake is associated with network round-trip time, it goes without saying that the longer the distance between the client and the server, the longer the latency until the HTTP request can be sent. The solution to this problem is generally to use HTTP keep-alive between the client and server, which is a major reason why it is so critical for Traffic Server, and other intermediaries, to be able to handle tens of thousands of concurrent connections.
  13. Before we go into the next use case scenario, lets discuss a couple of common problems that can severely affect your web sites performance.There are several reasons why a Web page might be slow to render, three common problems that I personally have to deal with are TCP 3-way handshake, TCP congestion control, and DNS lookups. We’ll discuss the first two here, and explain what we’ve done at Yahoo! using Traffic Server to alleviate these two problems.
  14. TCP congestion avoidance is a mechanism for TCP to avoid congestion on our networks. There are many different implementations of TCP congestion control mechanisms, but the general idea is to start out ‘slow’, and increase the amount of packets we have outstanding on the wires before we wait for an acknowledgement from the receiver. This is why sometimes congestion control is referred to as “slow start”. Similar to 3-way handshake, this will introduce latencies which are directly related to the round-trip time between client and server. Keep-alive generally doesn’t solve this, since by default (sometimes configurable) an idle connection will force the restart of another slow start.
  15. Before we go into the next use case scenario, lets discuss a couple of common problems that can severely affect your web sites performance.There are several reasons why a Web page might be slow to render, three common problems that I personally have to deal with are TCP 3-way handshake, TCP congestion control, and DNS lookups. We’ll discuss the first two here, and explain what we’ve done at Yahoo! using Traffic Server to alleviate these two problems.
  16. Looks familiar?
  17. Looks familiar?
  18. Alright, so lets talk about what problems a good HTTP (and/or proxy server) can solve. There are two primary concurrency problems for the server software developers to consider:How can the software handle tens of thousands of concurrent TCP connections?How can the software take advantage of modern multi-core CPUs? Commodity hardware today has 2, or 4 and even 8 or more cores in each server.* Additionally, while solving these two problems, we have to make sure we don’t introduce other resource starvations, for example, memory pressure.
  19. Multithreading allows a process to split itself, and run multiple tasks in “parallel”. There is significantly less overhead running threads compared to individual processes, but threads are still not free. They need memory resources, and incur context switches. It’s a known methodology for solving the concurrency problem, and many, many server implementations relies heavily on threads. Modern OS’es have good support for threads, and standard libraries are widely available.
  20. Deadlocks, where two threads (or processes) need to acquire the same two resources (e.g. locks), which can cause the application to completely stall (unrecoverable) Race conditions can occur, where the outcome is not deterministic, but depends on timing or scheduling of threads execution. Difficult to code and ‘get right’.
  21. Events are scheduled by the event loop, and event handlers execute specific code for specific events This makes it easier to code for, there’s no risk of deadlock or race condition Can handle a good number of connections (but not unlimited) Squid is a good example of an event driven server.
  22. Can not block on I/O or the entire event processor stall CPU intensive processing in an event handler can starve pending events for CPU (solution: Cooperative multi-tasking, where the event handler yields the CPU) Latency can become an issue if an event processor has to handle a lot of events Can only use one CPU / core
  23. There are n worker threads per core, typically 2. This gives around 16 – 24 threads of execution threads on typical modern hardware, each running an event loop There are m I/O threads per disk spindle. This is used to deal with disk I/O outside of the worker threads, and the default is 4. A critical configuration decision here is to scale this appropriately, particularly if a “disk” is raided, and might have more than 1 spindle under the hood. There are also a small number of “helper” threads, to do tasks like accepting new connections, produce log output and stats aggregation and presentation* All threads share resources, such as RAM and Disk cache, configurations, stats and logs.
  24. When people first look at the ATS configurations, this is usually their reaction.But, it’s actually the complete oppositeGood defaults, in most cases you don’t have to change anythingMost configurations can be reloaded without restartMost features are readily configurable in readable formats.
  25. Traffic Server comes with a fairly large number of configuration files. Most of the configurations have reasonable “defaults”. Most applications wouldn’t use even a fraction of the available configuration options and features.
  26. Getting started, only two or maybe three configuration files are necessary to tweak. records.config is a key-value configuration format, holding most global application configuration settings storage.config is used to specify disk storage configurations remap.config is used to specify mapping rules for rewriting requests, typically in a reverse proxy setup
  27. * Now, the big question, was this a huge waste of your time at the end of a long day?I really hope that it was not, and here’s why
  28. * Apache Traffic Server is a great, versatile tool readily available, and it’s free!
  29. * Apache Traffic Server is fast, ridiculously fast. If it’s not fast enough for your needs, please let us know, and please hire some developers, because you probably can afford it.
  30. * And of course, Traffic Server has a very vibrant community, as a top-level Apache project.
  31. * And finally, I’d like to thank Go Daddy to not only let me play with fun technology all day, they also pay my bills!s
  32. First time I met some of the original developers of Traffic Server, John Plevyak and George Paul both mentioned the “four horsemen”Foundational belief held by some of the original developers of Traffic Server
  33. * RAW disks, striped and monitored internally* Very low overhead on CPU and disk I/O, since there is no LRU to manage Very low memory overhead (10 bytes per object stored on cache, compare to 60-70 bytes for Squid) Can support very large disks (0.5PB per “partition”)