Nginx and reverse proxy

Nginx

Nginx (pronounced "engine-x") is an open source reverse proxy serverfor HTTPHTTPS , SMTPPOP3, and IMAP protocols, aswell as a load balancerHTTP cache,and a web server (originserver).

The nginx project started with a strong focus on high concurrency, highperformance and low memory usage. It is licensed underthe 2-clauseBSD-like license and it runs on LinuxBSD variantsMac OS XSolarisAIXHP-UX, as well as onother *nix flavors.It also has a proof of concept port for MicrosoftWindows.

Description

Nginx can be deployed to serve dynamic HTTP content on the network using FastCGI,SCGI handlers for scripts, WSGI applicationservers or Phusion Passenger module, and it can serve as a software load balancer.

Nginx uses an asynchronous event-driven approach to handling requests, instead of the Apache HTTP Server modelthat defaults to a threaded or process-oriented approach, where the Event MPM isrequired for asynchronous processing. Nginx's modularevent-driven architecture can provide more predictable performance under high loads.

According to W3Techs, it was used by 24.6% of the top 1million websites, 32.9% of the top 100,000 websites, and by 41.1% of the top1,000 websites. According to BuiltWith, it is used on 23.8%of the top 10,000 websites, and its growth within the top 10k, 100k and 1million segments increased. Wikipediauses nginx as its SSL termination proxy. As of OpenBSD release 5.2 (1 November 2012), nginx becamepart of the OpenBSD base system, providing an alternative to the system's forkof Apache 1.3, which it was intended to replace. Eventually, Apache was removed from the basesystem.

HTTP proxy and Web server features

·        Ability to handle more than10,000 simultaneous connections with a low memory footprint(~2.5 MB per 10k inactive HTTP keep-alive connections)

·        Handling of static files, index files, and auto-indexing

·        Reverse proxy withcaching

·        Load balancing with in-band healthchecks

·        Fault tolerance

·        TLS/SSL with SNI and OCSP stapling support,via OpenSSL.

·        FastCGISCGI, uWSGI support with caching

·        Name- and IP address-based virtual servers

·        IPv6-compatible

·        SPDY protocol support

·        WebSockets and HTTP/1.1 Upgrade (101 Switching Protocols)

·        FLV and MP4 streaming

·        Web page access authentication

·        gzip compression and decompression

·        URL rewriting

·        Custom logging with on-the-fly gzip compression

·        Response rate and concurrent requests limiting

·        Bandwidth throttling

·        Server Side Includes

·        IP address-based geolocation

·        User tracking

·        WebDAV

·        XSLT data processing

·        Embedded Perl scripting

Mail proxy features

·        TLS/SSL support

·        STARTTLS support

·        SMTPPOP3, and IMAP proxy

·        Authentication using an external HTTP server

 

Reverse proxy

In computernetworks, a reverse proxy is a type of proxy server thatretrieves resources on behalf of a client from one or more servers. These resources are then returned tothe client as though they originated from the server itself (or serversthemselves). While a forward proxy acts as an intermediary forits (usually nearby) associated clients and returns to them resourcesaccessible on the Internet, a reverse proxy acts as an intermediary for its(usually nearby) associated servers and only returns resources provided bythose associated servers.

A reverse proxy taking requests from the Internet andforwarding them to servers in an internal network. Those making requests to theproxy may not be aware of the internal network.

Uses of reverse proxies

·        Reverse proxies can hide the existence andcharacteristics of an origin server or servers.

·        Application firewall features canprotect against common web-based attacks. Without a reverse proxy, removingmalware or initiating takedowns, for example, can becomedifficult.

·        In the case of securewebsites, a web server may not perform SSL encryption itself,but instead offloads the task to a reverse proxy that may be equippedwith SSL acceleration hardware. (See SSL termination proxy.)

·        A reverse proxy can distributethe load from incoming requests to several servers, with eachserver serving its own application area. In the case of reverse proxying in theneighborhood of web servers, the reverse proxy may have torewrite the URL ineach incoming request in order to match the relevant internal location of therequested resource.

·        A reverse proxy can reduce load on its originservers by caching staticcontent, as well as dynamiccontent - also known as webacceleration. Proxy caches of this sort can often satisfy aconsiderable number of website requests, greatly reducing the load on theorigin server(s).

·        A reverse proxy can optimize content by compressing itin order to speed up loading times.

·        In a technique known as "spoonfeeding" a dynamically generated page can be produced all at once andserved to the reverse-proxy, which can then return it to the client a littlebit at a time. The program that generates the page need not remain open, thusreleasing server resources during the possibly extended time the clientrequires to complete the transfer.

·        Reverse proxies can operate whenever multipleweb-servers must be accessible via a single public IP address. The web serverslisten on different ports in the same machine, with the same local IP addressor, possibly, on different machines and different local IP addressesaltogether. The reverse proxy analyzes each incoming request and delivers it tothe right server within the local area network.

·        Reverse proxies can perform A/B testing and multivariate testing without placingjavascript tags or code into pages.

·        Reverse proxy is also a concept used in search engine marketing toautomatically instrument a destination website with usage tracking code thatcan be used for campaign reporting or campaign optimisation. It is a techniquetypically accepted as being bad practice.

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值