scala - What goes into making a Proxy Server? -
i'm pretty new development , i'm going building proxy server work. i'm not sure goes building proxy server , can find telling me install , set 1 up; want able build own. i'm going working in scala goes making 1 , do?
there 2 major kinds of proxies:
- reverse proxies
- forward proxies
both kinds of proxies may or may not have following value-added capabilities (this sample , near exhaustive):
- caching
- filtering
- load balancing
- fault tolerance
i'm going assume want build http/https forward or reverse proxy.
is reverse proxy?
an http load balancer in front 1 or more application servers reverse proxy. in case backend server either fixed, selected based on headers (host popular one), or selected pool when load balancing. backend may use same protocol or may use custom load balancing protocol. case i'd recommend using same protocol unless there's compelling reason not to.
is forward proxy?
an http proxy between end-users , internet forward proxy. in case proxy establishes new connection requested domain , sends own http request possibly directly copying headers , content of user. proxy may choose allow or deny requests based on domain names, urls, ip addresses, or content.
both kinds of proxies same thing: take inbound request , make destination on requestors behalf.
the basic procedure simple proxy follows:
- accept connection requestor
- copy request metadata (headers, parameters)
- establish connection destination
- send request destination metadata
to make work reverse proxy destination needs parameter of proxy process (configuration, code, etc.).
to make work forward proxy requestor needs have protocol expressing destination. there many protocols this: http. http connect, , socks being major ones. in simplest case client connects proxy server on http , sends same request send directly destination server.
a novel (as far know) thing enable reverse proxy accepts connections backends. allow dmz can't used attack backends in secure zone.
kate madsudaira provides a description of proxies , benefits @ architectural level in book the architecture of open source applications.
Comments
Post a Comment