SlideShare a Scribd company logo
1 of 13
Download to read offline
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 ?

More Related Content

What's hot

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
어형 이
 

What's hot (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
 

Similar to 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
 

Similar to 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
 

More from 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
 

Recently uploaded

Recently uploaded (20)

The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in  GERMANY for 2024: IPTVreelTHE BEST IPTV in  GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreel
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 

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 )