五大开源Web服务器

开源产品的出现不仅获得了个人用户的喜爱,众多知名企业也青睐于它。虽然开源产品数不胜数,但并不是每一个开源产品都能被广泛应用并得到大众的好评。在众多成功的开源产品中,只有少数领头羊,而其它产品只能望其项背。本文汇总了五款开源Web服务器,来看看有没有你需要的吧!

  Apache

  

  Apache

  Apache是一个免费的网络服务器系统,基于“开源”许可发布。阿帕奇版本2.0在大部分基于UNIX的操作系统上都能运行,像Linux、Solaris、Digital UNIX以及AIX。在UNIX/POSIX系列系统上,比如Rhapsody、BeOS、以及BS2000/OSD中也能运行。甚至在AmigaOS与Windows2000上也可以运行。根据Netcraft网站的调查,互联网中60%的网站采用Apache系统。

  Apache HTTP服务器从1996年诞生开始就成为全球使用最为广泛的Web服务器,其市场占有率远远超过第二名的IIS。2009年,全球超过1亿个网站使用Apache。

  据Netcraft2010年8月11日的数据统计表明,全球目前已有119,664,128个网站使用Apache,目前Apache市场占有率为54.90%,IIS为25.87%。

  Nginx

  

  Nginx

  Nginx是一个高性能的HTTP和反向代理服务器,也是一个 IMAP/POP3/SMTP代理服务器。 Nginx是由Igor Sysoev为俄罗斯访问量第二的 Rambler.ru 站点开发的。Igor将源代码以类BSD许可证的形式发布。Nginx 已经因为它的稳定性、丰富的功能集、示例配置文件和低系统资源的消耗而闻名了。

  Nginx可以在大多数类Unix操作系统上编译运行,并有 Windows移植版。Nginx 是一个很棒的高性能Web和反向代理服务器,它具有很多非常优越的特性:在高连接并发的情况下,Nginx是Apache服务器不错的替代品。在美国,Nginx是虚拟主机商人经常选择的软件平台之一。它能够支持高达50000个并发连接数的响应。Nginx 的安装非常简单,配置文件非常简洁(还能够支持perl语法),Bug非常少。

  Lighttpd

  

  Nginx

  Lighttpd 是一个德国人领导的开源Web服务器软件,其根本目的是提供一个专门针对高性能网站,安全、快速、兼容性好且灵活的web服务器环境。它的内存消耗非常低、CPU占用率低、效能好并且模块丰富。

  Lighttpd是众多开源轻量级的Web服务器中较为优秀的一个。支持FastCGI、CGI、Auth、输出压缩、 URL重写及Alias等重要功能,而Apache之所以流行,很大程度也是因为功能丰富,在lighttpd上很多功能都有相应的实现,这一点对于Apache用户来说非常重要,因为迁移到lighttpd就必须面对这些问题。

  Cherokee

  

  Cherokee

  Cherokee号称是目前最快的Web 服务器软件,据说在性能上甚至比Nginx还略胜一筹。而且它还提供了一个benkmark测试来试图证明这一点,参与比较的有Lighttpd和Nginx。

  同时,Cherokee还具有众多模块功能支持,比如FastCGI、SCGI、PHP、CGI、TLS及SSL加密连接、虚拟主机、授权认证、实时编码、载入均衡及与Apache兼容的日志文件等。从功能的丰富性上来说,Cherokee可以与Apache http比肩了。高性能和图形化的服务器管理是Cherokee的俩大卖点。

  Appweb

  

  Appweb

  Appweb是一个嵌入式HTTP Web服务器,它的主要设计思路是安全。这是直接集成到客户的应用和设备,便于开发和部署基于Web的应用程序和设备。它正迅速( 要求超过3500每秒)和紧凑(从11万),其中包括支持动态网页制作,服务器端嵌入式脚本过程中的CGI ,可加载模块,的SSL ,摘要式身份验证,虚拟主机, Apache样式配置,日志记录,单和多线程应用程序。它提供了大量的文档和示例。

  Appweb是完全遵循GPL软件许可协议(GNU General Public License)的开源Web服务器。 AppWeb Web服务器软件在功能上比GoAhead更加丰富和实用, 除了GoAhead已有的功能之外,还有如下特点: 支持服务器端的JavaScript脚本。


六款小巧的HTTP Server[C语言]

1、micro_httpd - really small HTTP server
特点:
    支持安全的 .. 上级目录过滤
    支持通用的MIME类型
    支持简单的目录
    支持目录列表
    支持使用 index.html 作为首页
    Trailing-slash redirection
    程序总共代码才200多行
这个httpd适合学习简单的Web Server编写学习,因为它只有一个简单的框架,只能够处理简单的静态页,可以考虑用来放静态页。
官方地址:http://www.acme.com/software/micro_httpd/
下载地址:http://www.acme.com/software/micro_httpd/micro_httpd_12dec2005.tar.gz

2、mini_httpd - small HTTP server
特点:
    支持GET、HEAD、POST方法
    支持CGI功能
    支持基本的验证功能
    支持安全 .. 上级目录功能
    支持通用的MIME类型
    支持目录列表功能
    支持使用 index.html, index.htm, index.cgi 作为首页
    支持多个根目录的虚拟主机
    支持标准日志记录
    支持自定义错误页
    Trailing-slash redirection
mini_httpd 也是相对比较适合学习使用,大体实现了一个Web Server的功能,支持静态页和CGI,能够用来放置一些个人简单的东西,不适宜投入生产使用。
官方地址:http://www.acme.com/software/thttpd/
下载地址:http://www.acme.com/software/mini_httpd/mini_httpd-1.19.tar.gz

3、thttpd - tiny/turbo/throttling HTTP server
thttpd中是一个简单,小型,轻便,快速和安全的http服务器:
简单:它能够支持HTTP/1.1协议标准,或者超过了最低水平
小巧:它具有非常少的运行时间,因为它不fork子进程来接受新请求,并且非常谨慎的分配内存(性能对比表:http://www.acme.com/software/thttpd/benchmarks.html)
便携:它能够在大部分的类Unix系统上运行,包括FreeBSD, SunOS 4, Solaris 2, BSD/OS, Linux, OSF等等
快速:它的速度要超过主流的Web服务器(Apache, NCSA, Netscape),在高负载情况下,它要快的多
安全:它努力的保护主机不受到攻击,不中断服务器

thttpd 类似于lighttpd,对于并发请求不使用fork()来派生子进程处理,而是采用多路复用(Multiplex)技术来实现。因此效能很好。同时它还有一个特点就是基于URL的文件流量限制,这对于下载的流量控制而言是非常方便的。象Apache就必须使用插件实现,效率较thttpd低。
thttpd跟lighttpd类似,适合静态资源类的服务,比如图片、资源文件、静态HTML等等的应用,性能应该比较好,同时也适合简单的CGI应用的场合。
官方地址:http://www.acme.com/software/thttpd/
下载地址:http://www.acme.com/software/thttpd/thttpd-2.25b.tar.gz

4、lighttpd - light footprint + httpd = LightTPD
Lighttpd是一个德国人领导的开源软件,其根本的目的是提供一个专门针对高性能网站,安全、快速、兼容性好并且灵活的web server环境。具有非常低的内存开销,cpu占用率低,效能好,以及丰富的模块等特点。
lighttpd 是众多OpenSource轻量级的web server中较为优秀的一个。支持FastCGI, CGI, Auth, 输出压缩(output compress), URL重写, Alias等重要功能,而Apache之所以流行,很大程度也是因为功能丰富,在lighttpd上很多功能都有相应的实现了,这点对于apache的用户是非常重要的,因为迁移到lighttpd就必须面对这些问题。
实用起来lighttpd确实非常不错,apache主要的问题是密集并发下,不断的fork()和切换,以及较高(相对于 lighttpd而言)的内存占用,使系统的资源几尽枯竭。而lighttpd采用了Multiplex技术,代码经过优化,体积非常小,资源占用很低,而且反应速度相当快。
利用apache的rewrite技术,将繁重的cgi/fastcgi任务交给lighttpd来完成,充分利用两者的优点,现在那台服务器的负载下降了一个数量级,而且反应速度也提高了一个甚至是2个数量级!
lighttpd 适合静态资源类的服务,比如图片、资源文件、静态HTML等等的应用,性能应该比较好,同时也适合简单的CGI应用的场合。

官方地址:http://www.lighttpd.net/
下载地址:http://www.lighttpd.net/download/lighttpd-1.4.16.tar.gz

5、SHTTPD - Simple HTTPD
Shttpd是另一个轻量级的web server,具有比thttpd更丰富的功能特性,支持CGI, SSL, cookie, MD5认证, 还能嵌入(embedded)到现有的软件里。最有意思的是不需要配置文件!由于shttpd可以嵌入其他软件,因此可以非常容易的开发嵌入式系统的web server,官方网站上称shttpd如果使用uclibc/dielibc(libc的简化子集)则开销将非常非常低。

特点:
    小巧、快速、不膨胀、无需安装、简单的40KB的exe文件,随意运行
    支持GET, POST, HEAD, PUT, DELETE 等方法
    支持CGI, SSL, SSI, MD5验证, resumed download, aliases, inetd模式运行
    标准日志格式
    非常简单整洁的嵌入式API
    dietlibc friendly. NOT that friendly to the uClibc (*)
    容易定制运行在任意平台:Windows, QNX, RTEMS, UNIX (*BSD, Solaris, Linux)
由于shttpd可以轻松嵌入其他程序里,因此shttpd是较为理想的web server开发原形,开发人员可以基于shttpd开发出自己的webserver!
官方网站:http://shttpd.sourceforge.net/
下载地址:http://jaist.dl.sourceforge.net/sourceforge/shttpd/shttpd-1.38.tar.gz

 

6、tinyhttpd

 

tinyhttpd is a very simple webserver. It is not for production use; instead it is primarily for a learning tool for persons investigating the http protocol and UNIX system calls.

Despite its simple nature, tinyhttpd supports threading and CGI scripts! For more information, see the accompanying README file and the code itself.

tinyhttpd is tested on Sparc Solaris and will probably not run on other operating systems as-is. However, commenting out the line that does threading may be all that is required to port it. I would like to autoconfiscate tinyhttpd at some point in time to help make it more portable.

There is no downloadable release of tinyhttpd, yet. Until then, you can get it by anonymous CVS.

The real homepage for tinyhttpd is the project page

地址:http://tinyhttpd.sourceforge.net/

转载自:http://blog.linuxphp.org/?action=show&id=60

 

【译】几种Web服务器比较

注意到有这款服务器nginx。没听过,一查有了下文。其中有一个还是听过的。对照翻译了下文。

Apache and IIS are the most common web servers in use today, but they are far from alone. There is a huge amount of web server software out there, both free and commercial.

到目前,Apache和IIS是用的最为普遍的Web服务器,但是它们太过单一,在此之外这里还有许多Web服务器软件,或是免费的或是商业的。

In this article we present four popular alternative web servers: Lighttpd, Nginx, LiteSpeed and Zeus. The first two are free and open source while the other two are commercial, closed-source alternatives. What they all have in common is that they focus on high performance.

本文我们介绍四种最受欢迎的Web服务器: Lighttpd, Nginx, LiteSpeedZeus。 前两个都是免费且开源的,而另两种都是商业的,闭源的。它们的共同点在于都着重于高性能上。

We will also take a look at how many websites are actually using these web servers.

我们看看有多少网站实际上在使用它们。

But first a brief presentation of each of one:

首先一个简短的介绍其中之一:

Lighttpd
  • Brief info: Pronounced “Lighty”, Lighttpd is as the name implies a small, lightweight web server which has a low memory footprint and light CPU load. Lighttpd is a good alternative to serve static content but it has also gained recognition in the Ruby on Rails and PHP communities.

    Lighttpd 的名称暗示小,轻量级web服务器,占用内存小且cpu负荷低。Lighttpd 是服务于静态内容的不错选择。然而它更被公认为是用在Ruby 和 PHP 上。
  • Used by: Wikimedia (Wikipedia), Sourceforge, YouTube, The Pirate Bay, Meebo, Imageshack, Sendspace, Mininova.
  • Cost: Free
  • Open Source: Yes
  • OS platforms: Linux, freeBSD, Solaris, MacOS X, Windows (under Cygwin)
  • Homepage: http://www.oschina.net/p/lighttpd
Nginx
  • Brief info: Pronounced “engine X”, Nginx is a lightweight web server and reverse proxy. originally written by Igor Sysoev for Rambler.ru (Russia’s second most visited website). Nginx is known for stability and simple configuration in addition to its low resource consumption. It can also act as an IMAP/POP3 proxy.

    Nginx 是一款轻量级web服务器和反向代理。最初由Igor Sysoev 编写。它的出名在于其稳定性和简单的配置,除此之外低资源消耗。 还有它可以作为IMAP/POP3协议。
  • Used by: Yellow Pages, Hulu, Zimbra, the Friends for Sale Facebook app, Rambler, and it also seems that Wordpress.com just started using it instead of LiteSpeed.
  • Cost: Free
  • Open Source: Yes
  • OS platforms: Linux, FreeBSD, Solaris, MacOS X
  • Homepage: http://www.oschina.net/p/nginx
LiteSpeed
  • Brief info: LiteSpeed is a commercial web server designed specifically for large websites. One of LiteSpeed’s advantages is that it can read Apache configurations directly which makes it easy to integrate with existing products to replace Apache. The server is lightweight and as the name implies very fast.

    LiteSpeed 一种被特别设计用作大型网站的商业web服务器。 其中一个优势就是它能直接读取Apache 的配置信息。并轻易将它现有的产品结合在一起来代替Apache 。这种服务器是轻量级的就如它的名字暗示出非常快。
  • Used by: Wordpress (until recently at least, but now Wordpress.com appears to be using nginx), Twitter, GigaOm, Bravenet.
  • Cost: Free to $1,299 depending on the edition.
  • Open Source: No
  • OS platforms: Linux, FreeBSD, Solaris, MacOS X
  • Homepage: http://www.ruanku.com/p/litespeedtech-web-server
Zeus
  • Brief info: Zeus web server is a high performance web server. It has received PC Magazine Editors’ Choice award and also the eWeek/PC Magazine Innovation in Infrastructure award. Zeus is a highly flexible enterprise product.

    Zeus web server 是一个高性能的web服务器。它曾被PC Magazine Editors’ Choice 授过奖并且eWeek/PC Magazine Innovation 也授予过它奖项。Zeus 是一种高度灵活的企业产品。
  • Used by: Sony, Telefónica, Virgin media, phpBB.
  • Cost: $1,700 up to two physical CPUs; $850 per additional CPU.
  • Open Source: No
  • OS platforms: Linux, FreeBSD, Solaris, HP-UX
  • Homepage: http://www.ruanku.com/p/zeus-web-server
How many websites are using these web servers?

According to Netcraft, Lighttpd is currently the most common of these four web servers. On April 1, the numbers of websites for each were as follows:
有多少网站在使用它们?
根据Netcraft统计,Lighttpd 是当前这四种服务器中最普遍的。在4月1日统计到的网站数字。

Lighttpd: 1,495,308
Nginx: 1,018,503
LiteSpeed: 668,030
Zeus: 420,477

These positions were not always the same, though. As you can see by the following graph, which shows the numbers from January 2006 to April 2008, the situation has changed significantly over time.

然而这个形势并不一直是一样的。通过下图你可以看到从2006年1月到2008年4月,形势随着时间而改变着。


The graph is based on data from Netcraft (their web server survey archives).

The huge leap for Lighttpd in January-March of 2007 is most likely due to one or more web hosting or domain registration companies switching over to Lighttpd either for their regular pages, or for parked pages, or both. If anyone knows what happened there in more detail, please feel free to let us know in the comments.

2007年1月到3月,很可能归咎于一个或多个web服务商或域名注册公司转变使用Lighttpd 。发生了什么如果有人知道的更详细些……

Interestingly, the number of servers using the Zeus web server has remained quite constant over the last two years, and even decreased a little. That said, it is mainly an enterprise solution, so this is perhaps not so surprising.

非常有趣的是,过去两年使用Zeus 作为服务器的数量维持在一个非常恒定的状态。而且减少了一点点。可以说,它主要是针对企业解决方案。所以从这点上是不值得惊讶的。

The two web servers that have been growing the fastest lately are Nginx and LiteSpeed. Nginx recently passed the one-million-websites mark.

Nginx 和 LiteSpeed 这两种服务器增长速度很快。近来Nginx 已经超过了一百万个站点

These numbers of course still pale next to Apache’s roughly 83 million websites, but there is no doubt that these alternative web servers are gaining in popularity. Who knows, one of them may be just right for you?

当然这些数字对于Apache的大概8300万来说不值一提。但仍无置疑的是这些可供选择的服务器越来越受欢迎。有谁知道,其中之一很可能是非常适合你的?

转载自:http://www.oschina.net/bbs/thread/4056


  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
SpringCloud的五大核心组件如下: 1. Eureka:服务注册与发现组件,提供了服务注册和发现的功能,可以实现服务的自动化注册和发现。 2. Feign:声明式的Web Service客户端,可以让编写Web Service客户端更加简单。 3. Ribbon:客户端负载均衡器,可以在多个服务提供者之间进行负载均衡。 4. Hystrix:容错管理工具,可以实现服务的降级、熔断、限流等功能,提高系统的可用性。 5. Zuul:网关组件,可以实现请求的路由、过滤、转发等功能,提高系统的安全性和可用性。 以下是SpringCloud五大组件的简要介绍: 1. Eureka:Eureka是Netflix开源的一款基于REST的服务治理解决方案,主要用于AWS云中定位服务,以实现中间层服务器的负载均衡和故障转移。Eureka包含两个组件:Eureka Server和Eureka Client。Eureka Server提供服务注册和发现功能,Eureka Client是一个Java客户端,用于简化与Eureka Server的交互。 2. Feign:Feign是一个声明式的Web Service客户端,可以让编写Web Service客户端更加简单。Feign支持多种注解,包括FeignClient、RequestMapping、PathVariable、RequestParam等,可以方便地定义和调用Web Service接口。 3. Ribbon:Ribbon是一个客户端负载均衡器,可以在多个服务提供者之间进行负载均衡。Ribbon支持多种负载均衡策略,包括轮询、随机、加权轮询、加权随机等,可以根据实际情况选择合适的负载均衡策略。 4. Hystrix:Hystrix是一个容错管理工具,可以实现服务的降级、熔断、限流等功能,提高系统的可用性。Hystrix通过线程池隔离、断路器、请求缓存等机制来实现容错管理,可以有效地防止服务雪崩效应。 5. Zuul:Zuul是一个网关组件,可以实现请求的路由、过滤、转发等功能,提高系统的安全性和可用性。Zuul支持多种路由策略,包括基于URL路径、基于服务名称、基于请求参数等,可以根据实际情况选择合适的路由策略。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值