SlideShare une entreprise Scribd logo
1  sur  13
Télécharger pour lire hors ligne
ExaProxy
open source web proxy
UKNOF - 3rd of May 2012
York
Thomas Mangin
Exa Networks
Non-caching Proxy
ALERT !
or transparent proxy
reverse
forward
HTTP/1.1
epoll on linux
multi-threaded
Non-caching Proxy
High Performance
non-blocking event based network loop
use of cheap co-routine
sockets as message bus
or transparent proxy
reverse
forward
HTTP/1.1
ALERT !
own async DNS library
conservative memory usage
“pause” reader when writer is too slow
Non-caching Proxy
IPv6 INSIDE
Full native IPv6 support
IPv6 to IPv4 gateway (and vice versa)
or transparent proxy
reverse
forward
NO !
It does NOT blend
HTTP/1.1
ALERT !
SQUID
VARNISH
HA PROXY
TINYPROXYPOUND
PERLBAL
QUITE A FEW OPEN SOURCE WEB PROXIES
FORWARD PROXIES
FILTERING PROXIES
WHAT PROXY ARE AVAILABLE FOR OUR USE
Our Need !
SQUID FILTERING ..
A Filtering SQUID cluster ...
Works
However
Linux ipvsadm for load balancing (MAC address rewrite)
Farm of squid servers
Can’t use L7 Load balancer
Can not filter HTTPS (CONNECT)
Load balancing must be sticky
“cascade effect” on failure
no load balancing backend monitoring
And you need to maintain
a TWO liner PATCH
SQUID purposefully crashes
on high load
debug(84, 1) ("WARNING: All %s processes are busy.n", hlp->id_name);
debug(84, 1) ("WARNING: up to %d pending requests queuedn", hlp-
>stats.max_queue_size);
- if (hlp->stats.queue_size > hlp->n_running * 2)
- fatalf("Too many queued %s requests (%d on %d)", hlp->id_name, hlp-
>stats.queue_size, hlp->n_running);
SQUID compatible and
ICAP (REQMOD) like mode
Cookie modification
force safe-search on youtube
HTTPS filtering / Interception
when browser/other proxy explicitly configured
redirect the browser to a HTTP page ..
HTTP/1.1 200 Connection Established
CONNECT www.hsbc.com:443 HTTP/1.1
Host: www.hsbc.com
HTTP/1.1 302 Surfprotected
Cache-Control: no-store
Location: http://www.surfprotect.co.uk/
Connection: closeHTTP/1.1 403 Surfprotected
Connection: close
Browsers just disabled
this “feature” following
some work on HTTBisNo way to return a
message to the
browser via 4xx/5xx
URL Rewrite
display a different URL
250+ commits since (and counting)
HAVE FUN ...***
*** if you are brave, mad, desperate or any of the above
! From: !David Farrar <david.farrar@exa-networks.co.uk>
! Subject: !D'oh!
! Date: !27 April 2012 12:31:53 GMT+01:00
! To: !Thomas Mangin <thomas.mangin@exa-networks.co.uk>
I now know why it was such a pain tracking down the source of the memory leak
It requires that -
- The client starts a new request over a socket that's already been used for at least one request
- The send buffer to the remote web server was full when we first try sending the new request
- The client is uploading a very large file (or this happens many times with smaller files)
- The upload speed from the client to the proxy is greater than the upload speed from the proxy to the
remote web server
http://code.google.com/p/exaproxy/
We have !
( It only took a week )
13
QUESTIONS ?

Contenu connexe

Tendances

Picobgp - A simple deamon for routing advertising
Picobgp - A simple deamon for routing advertisingPicobgp - A simple deamon for routing advertising
Picobgp - A simple deamon for routing advertising
Claudio Mignanti
 
debugging openstack neutron /w openvswitch
debugging openstack neutron /w openvswitchdebugging openstack neutron /w openvswitch
debugging openstack neutron /w openvswitch
어형 이
 

Tendances (20)

Picobgp - A simple deamon for routing advertising
Picobgp - A simple deamon for routing advertisingPicobgp - A simple deamon for routing advertising
Picobgp - A simple deamon for routing advertising
 
IPv6 in CloudStack Basic Networking
IPv6 in CloudStack Basic NetworkingIPv6 in CloudStack Basic Networking
IPv6 in CloudStack Basic Networking
 
6. hands on - open mano demonstration in remote pool of servers
6. hands on - open mano demonstration in remote pool of servers6. hands on - open mano demonstration in remote pool of servers
6. hands on - open mano demonstration in remote pool of servers
 
Linux Network commands
Linux Network commandsLinux Network commands
Linux Network commands
 
Packet Tracer: Nat protocol
Packet Tracer: Nat protocolPacket Tracer: Nat protocol
Packet Tracer: Nat protocol
 
The Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchThe Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitch
 
Dynamische Routingprotokolle Aufzucht und Pflege - OSPF
Dynamische Routingprotokolle Aufzucht und Pflege - OSPFDynamische Routingprotokolle Aufzucht und Pflege - OSPF
Dynamische Routingprotokolle Aufzucht und Pflege - OSPF
 
Thrift+scribe实现分布式日志收集,并与log4j集成
Thrift+scribe实现分布式日志收集,并与log4j集成Thrift+scribe实现分布式日志收集,并与log4j集成
Thrift+scribe实现分布式日志收集,并与log4j集成
 
OVS-NFV Tutorial
OVS-NFV TutorialOVS-NFV Tutorial
OVS-NFV Tutorial
 
Nomenclatura QNAP
Nomenclatura QNAPNomenclatura QNAP
Nomenclatura QNAP
 
5. hands on - building local development environment with Open Mano
5. hands on - building local development environment with Open Mano5. hands on - building local development environment with Open Mano
5. hands on - building local development environment with Open Mano
 
debugging openstack neutron /w openvswitch
debugging openstack neutron /w openvswitchdebugging openstack neutron /w openvswitch
debugging openstack neutron /w openvswitch
 
nullcon 2010 - Software Fuzzing with Wireplay
nullcon 2010 - Software Fuzzing with Wireplaynullcon 2010 - Software Fuzzing with Wireplay
nullcon 2010 - Software Fuzzing with Wireplay
 
Passwords Found on a Wireless Network
Passwords Found on a Wireless NetworkPasswords Found on a Wireless Network
Passwords Found on a Wireless Network
 
Nsq meetup-messaging
Nsq meetup-messagingNsq meetup-messaging
Nsq meetup-messaging
 
Raspi32
Raspi32Raspi32
Raspi32
 
Linux network stack
Linux network stackLinux network stack
Linux network stack
 
DevoxxFR 2016 - 3 degrees of MoM
DevoxxFR 2016 - 3 degrees of MoMDevoxxFR 2016 - 3 degrees of MoM
DevoxxFR 2016 - 3 degrees of MoM
 
Building your own CGN boxes with Linux
Building your own CGN boxes with LinuxBuilding your own CGN boxes with Linux
Building your own CGN boxes with Linux
 
Achieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMAchieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVM
 

Similaire à ExaProxy

T3DD12 Caching with Varnish
T3DD12 Caching with VarnishT3DD12 Caching with Varnish
T3DD12 Caching with Varnish
AOE
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
Joseph Scott
 
T3DD12 Caching with Varnish
T3DD12 Caching with VarnishT3DD12 Caching with Varnish
T3DD12 Caching with Varnish
AOE
 
Pushing the web — WebSockets
Pushing the web — WebSocketsPushing the web — WebSockets
Pushing the web — WebSockets
Roland M
 
Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)
WordCamp Cape Town
 
Ch 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet ServersCh 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet Servers
webhostingguy
 
Computer network (10)
Computer network (10)Computer network (10)
Computer network (10)
NYversity
 

Similaire à ExaProxy (20)

MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011
 
HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011
 
HAProxy scale out using open source
HAProxy scale out using open sourceHAProxy scale out using open source
HAProxy scale out using open source
 
Using aphace-as-proxy-server
Using aphace-as-proxy-serverUsing aphace-as-proxy-server
Using aphace-as-proxy-server
 
T3DD12 Caching with Varnish
T3DD12 Caching with VarnishT3DD12 Caching with Varnish
T3DD12 Caching with Varnish
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
 
T3DD12 Caching with Varnish
T3DD12 Caching with VarnishT3DD12 Caching with Varnish
T3DD12 Caching with Varnish
 
Speedup your WordPress mit Nginx und HTTP/2
Speedup your WordPress mit Nginx und HTTP/2Speedup your WordPress mit Nginx und HTTP/2
Speedup your WordPress mit Nginx und HTTP/2
 
Pushing the web — WebSockets
Pushing the web — WebSocketsPushing the web — WebSockets
Pushing the web — WebSockets
 
Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)
 
REST in peace @ IPC 2012 in Mainz
REST in peace @ IPC 2012 in MainzREST in peace @ IPC 2012 in Mainz
REST in peace @ IPC 2012 in Mainz
 
Ch 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet ServersCh 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet Servers
 
Introduction to OverTheBox
Introduction to OverTheBoxIntroduction to OverTheBox
Introduction to OverTheBox
 
High Performance Wordpress: “Faster, Cheaper, Easier : Pick Three”
High Performance Wordpress: “Faster, Cheaper, Easier : Pick Three”High Performance Wordpress: “Faster, Cheaper, Easier : Pick Three”
High Performance Wordpress: “Faster, Cheaper, Easier : Pick Three”
 
Owasp AppSecEU 2015 - BeEF Session
Owasp AppSecEU 2015 - BeEF SessionOwasp AppSecEU 2015 - BeEF Session
Owasp AppSecEU 2015 - BeEF Session
 
WebSocket protocol
WebSocket protocolWebSocket protocol
WebSocket protocol
 
Computer network (10)
Computer network (10)Computer network (10)
Computer network (10)
 
HTTP
HTTPHTTP
HTTP
 
66 pfsense tutorial
66 pfsense tutorial66 pfsense tutorial
66 pfsense tutorial
 
Load Balancing with Apache
Load Balancing with ApacheLoad Balancing with Apache
Load Balancing with Apache
 

Plus de Thomas Mangin (9)

LINX 83 ExaBGP as a route server ?
LINX 83  ExaBGP as a route server ?LINX 83  ExaBGP as a route server ?
LINX 83 ExaBGP as a route server ?
 
VOIP QOS
VOIP QOSVOIP QOS
VOIP QOS
 
Naked BGP
Naked BGPNaked BGP
Naked BGP
 
The benefit of BGP for every service provider
The benefit of BGP for every service providerThe benefit of BGP for every service provider
The benefit of BGP for every service provider
 
ScavengerEXA
ScavengerEXAScavengerEXA
ScavengerEXA
 
AS-STATS
AS-STATSAS-STATS
AS-STATS
 
BGP route leak
BGP route leakBGP route leak
BGP route leak
 
IXLeeds 2 Technical Update
IXLeeds 2 Technical UpdateIXLeeds 2 Technical Update
IXLeeds 2 Technical Update
 
IXLeeds
IXLeeds IXLeeds
IXLeeds
 

Dernier

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

ExaProxy

  • 1. ExaProxy open source web proxy UKNOF - 3rd of May 2012 York Thomas Mangin Exa Networks
  • 2. Non-caching Proxy ALERT ! or transparent proxy reverse forward HTTP/1.1
  • 3. epoll on linux multi-threaded Non-caching Proxy High Performance non-blocking event based network loop use of cheap co-routine sockets as message bus or transparent proxy reverse forward HTTP/1.1 ALERT ! own async DNS library conservative memory usage “pause” reader when writer is too slow
  • 4. Non-caching Proxy IPv6 INSIDE Full native IPv6 support IPv6 to IPv4 gateway (and vice versa) or transparent proxy reverse forward NO ! It does NOT blend HTTP/1.1 ALERT !
  • 6. FORWARD PROXIES FILTERING PROXIES WHAT PROXY ARE AVAILABLE FOR OUR USE Our Need !
  • 8. A Filtering SQUID cluster ... Works However Linux ipvsadm for load balancing (MAC address rewrite) Farm of squid servers Can’t use L7 Load balancer Can not filter HTTPS (CONNECT) Load balancing must be sticky “cascade effect” on failure no load balancing backend monitoring
  • 9. And you need to maintain a TWO liner PATCH SQUID purposefully crashes on high load debug(84, 1) ("WARNING: All %s processes are busy.n", hlp->id_name); debug(84, 1) ("WARNING: up to %d pending requests queuedn", hlp- >stats.max_queue_size); - if (hlp->stats.queue_size > hlp->n_running * 2) - fatalf("Too many queued %s requests (%d on %d)", hlp->id_name, hlp- >stats.queue_size, hlp->n_running);
  • 10. SQUID compatible and ICAP (REQMOD) like mode Cookie modification force safe-search on youtube HTTPS filtering / Interception when browser/other proxy explicitly configured redirect the browser to a HTTP page .. HTTP/1.1 200 Connection Established CONNECT www.hsbc.com:443 HTTP/1.1 Host: www.hsbc.com HTTP/1.1 302 Surfprotected Cache-Control: no-store Location: http://www.surfprotect.co.uk/ Connection: closeHTTP/1.1 403 Surfprotected Connection: close Browsers just disabled this “feature” following some work on HTTBisNo way to return a message to the browser via 4xx/5xx URL Rewrite display a different URL
  • 11. 250+ commits since (and counting)
  • 12. HAVE FUN ...*** *** if you are brave, mad, desperate or any of the above ! From: !David Farrar <david.farrar@exa-networks.co.uk> ! Subject: !D'oh! ! Date: !27 April 2012 12:31:53 GMT+01:00 ! To: !Thomas Mangin <thomas.mangin@exa-networks.co.uk> I now know why it was such a pain tracking down the source of the memory leak It requires that - - The client starts a new request over a socket that's already been used for at least one request - The send buffer to the remote web server was full when we first try sending the new request - The client is uploading a very large file (or this happens many times with smaller files) - The upload speed from the client to the proxy is greater than the upload speed from the proxy to the remote web server http://code.google.com/p/exaproxy/ We have ! ( It only took a week )