Chinaunix首页 | 论坛 | 博客
  • 博客访问: 798714
  • 博文数量: 124
  • 博客积分: 1927
  • 博客等级: 上尉
  • 技术积分: 932
  • 用 户 组: 普通用户
  • 注册时间: 2010-08-31 14:06
文章分类

全部博文(124)

文章存档

2018年(5)

2017年(2)

2016年(6)

2015年(4)

2014年(24)

2013年(7)

2012年(11)

2011年(13)

2010年(52)

我的朋友

分类: LINUX

2014-06-10 17:09:19

原文地址:嵌入式web服务器预研报告2 作者:soqsoq

Mini_httpd

1.       介绍

Mini_httpd是一个小型的HTTP服务器。开源,它的性能不强,但是它非常适合于中小访问量的站点。Mini_httpdthttpd都是ACME Labs 开发的软件,功能没有thttpd强。

2.       操作系统

thttpd相同。

3. 版本

发布的版本从1.001.19。最新发布的版本是version 1.19.tar 41kB,解压后为140kB

4. 功能、特点

它实现了HTTP服务器的所有的基本功能,包括:

·         支持CGI功能

·         支持基本的验证功能

  • 支持安全 .. 上级目录功能
  • 支持通用的MIME类型
  • 支持目录列表功能
  • 支持使用 index.html, index.htm, index.cgi 作为首页
  • 支持多个根目录的虚拟主机
  • 支持标准日志记录
  • 支持自定义错误页
  • Trailing-slash redirection
  • 它可以配置成SSL/HTTPS IPv6.

5.可执行文件大小、内存使用情况

编译后可能要小于boathttpd,内存使用可能小于boathttpdMini_httpd的功能,thttpd功能几乎都覆盖了。

 

mini_httpd 也是相对比较适合学习、实验使用,大体实现了一个Web Server的功能,支持静态页和CGI,能够用来放置一些个人简单的东西,不适宜投入生产使用。

官方地址:
下载地址:

Shttpd

1.介绍

Shttpd,开源。它是另一个轻量级的web server,具有比thttpd更丰富的功能特性,支持CGI, SSL, cookie, MD5认证, 还能嵌入(embedded)到现有的软件里。最有意思的是不需要配置文件!由于shttpd可以轻松嵌入其他程序里,因此shttpd是较为理想的web server开发原形,开发人员可以基于shttpd开发出自己的webserver,官方网站上称shttpd如果使用uclibc/dielibc(libc的简化子集)则开销将非常非常低。

2.操作系统

Windows, QNX, RTEMS, UNIX (*BSD, Solaris, Linux)

3.版本

    它的最新版本是shttpd-1.38.tar 75kB,解压后为278kB。发布的版本从2004年的1.3到现在的2007年的1.38

4.功能、特点

l         小巧、快速、不膨胀、无需安装、简单的40KBexe文件,随意运行

l         支持GET, POST, HEAD, PUT, DELETE 等方法

l         支持CGI, SSL, SSI, MD5验证, resumed download, aliases, inetd模式运行

l         标准日志格式

l         非常简单整洁的嵌入式API

l         对库dietlibc 支持友好,对uClibc (*)不友好。

l         容易定制运行在任意平台:Windows, QNX, RTEMS, UNIX (*BSD, Solaris, Linux)

 不具有的功能:

virtual hosts, user home directorires, ACL (access control lists), traffic shaping, keep-alive connections, FCGI (Fast CGI) support.

5.可执行文件大小、内存使用情况

编译后的可执行的二进制文件为40kB左右.

 

网上查询结果是有关内容很少。使用范围不广。有网友对它的评论是:shttpd功能算是比较全的, 但在处理二进制数据时不够稳定, 时有异常. 有待观察。

官方网站:
下载地址:

Lighttpd

1.介绍

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技术,代码经过优化,体积非常小,资源占用很低,而且反应速度相当快。利用apacherewrite技术,将繁重的cgi/fastcgi任务交给lighttpd来完成,充分利用两者的优点,现在那台服务器的负载下降了一个数量级,而且反应速度也提高了一个甚至是2个数量级!lighttpd 适合静态资源类的服务,比如图片、资源文件、静态HTML等等的应用,性能应该比较好,同时也适合简单的CGI应用的场合,lighttpd可以很方便的通过fastcgi支持php

2.操作系统

    UnixlinuxSolarisFreeBSD

3.版本

最新版本lighttpd-1.4.17.tar,783kB,解压后为3.48MB

4.功能、特点

下面是lighttpd官方网站给出的lighttpd特点,

l         virtual hosts

l         virtual directory listings

l         URL-Rewriting, HTTP-Redirects

l         automatic expiration of files

l         Large File Support (64bit fileoffsets)

l         Ranges (start-end, start-, -end, multiple ranges)

l         on-the-fly output-compression with transparent caching

l         deflate, gzip, bzip2

l         authentication

l         basic, digest

l         backends: plain files, htpasswd, htdigest, ldap

l         fast and secure application controlled downloads

l         Server Side Includes

l         User Tracking

l         FastCGI, CGI, SSI

l         PHP-Support:

l         same speed as or faster than apache + mod_php4

l         includes a utility to spawn FastCGI processes (neccesary for PHP 4.3.x)

l         via FastCGI and CGI interface

l         support Code Caches like Turckmm, APC or eaccelarator

l         load-balanced FastCGI

l         (one webserver distibutes request to multiple PHP-servers via FastCGI)

l         Security features:

l         chroot(), set UID, set GID

l         protecting docroot

l         strict HTTP-header parsing

5.可执行文件大小、内存使用情况

没有查到具体数据。

 

Lighttpd缺点就是bug比较多,软件并不稳定,而且文档太简略,有些功能需要你自己猜测才懂得怎么配置。尤其是使用内存,很难说清楚具体使用量,一般在1020M(繁忙站点),但有时候会突发到100M,并稳定下来。不过相对apache的使用量,这个已经不算多。

lighttpd虽然是web服务器中的轻量级。但对于嵌入式web服务器来说还是较大的一个web服务器,功能较强。

有人评论lighttpdlighttpdapache 属重量级服务器, 成熟稳定, 体积较大, 在复杂的嵌入式应用上可选用.

    Lighttpd使用的不广泛,在google中搜索:嵌入式 lighttpd,结果几乎没有相关的内容。Lighttpd使用内存比其它小型嵌入式web服务器内存资源要多。毕竟它不是专为嵌入式设备开发的。
官方网站:

 

Goahead

1.介绍

GoAhead Webserver是为嵌入式实时操作系统(RTOS)量身定制的Web服务器。它的目标也许不在于目前的WEB服务器市场,而是面向当嵌入式系统深入我们的工作与生活的明天,那时,它也许会成为使用最广泛的WEB服务器。GoAhead Webserver构建在设备管理框架(Device Management Framework)之上,用户可以像标准的Web Services一样来部署自己的应用,不需要额外的编程。GoAhead Webserver支持SOAP客户端(Simple Object Access Protocol,简单对象访问协议),XML-RPC客户端,各种Web浏览器和单独的Flash客户端GoAhead Webserver支持一种类ASP的服务器端脚本语言其语法形式和微软的ASP语法基本相同(Active Server Page)。GoAhead Webserver是跨平台的服务器软件,可以稳定地运行在WindowsLinuxMac OS X操作系统之上GoAhead Webserver是开放源代码的,这意味着你可以随意修改Web服务器的功能这款WEB服务器非常小巧,它的WIN CE版本编译后的大小还不到60k,它的输出通常也是面向一些小屏幕设备。在性能方面,使用一颗24MH z68040处理器,它的响应速度为20/秒,使用266MHzPentium处理器可以达到50/秒的响应速度。

2.操作系统

Windows CE, Wind River VxWorks, Linux, Lynx, QNX,Windows 95/98/NT

3版本

    Goahead2003年开始发布,最新的版本:webs218.tar 827kB,解压后为2.28MB
4.
功能特点

  • 很小的内存消耗
  • 支持认证功能Digest Access Authentication (DAA)
  • 支持安全的通信,例如SSL(安全的套接字层)
  • 支持动态Web页面,如ASP页面
  • 可以使用传统的C语言编程定制Web页面里的HTML标签
  • 支持CGI(公共网关编程接口)
  • 嵌入式的JavaScript脚本翻译器
  • 独特的URL分析器
  • 它基本上属于一个HTTP1.0标准的WEB服务器,对一些HTTP1.1的特性如(持久连接)也提供了支持。每秒65connections

5.可执行文件大小、内存使用情况

内存需求60K它的WIN CE版本编译后的大小还不到60k

 

2004 2.18 版之后, GoAhead 官方不再对它免费许可的升级和支持,如果是学习和研究之用, 移植很方便, 不必关心太多; 如果商用, 那些已知的 bug 就必须手工去改,包括对 cgi 的支持, 对操作系统差异而引用的 bug,参考下这个 http://www.eybuild.com/develop/demoshow.htm ,这个就是用的 GoAhead

GoAhead官方网站:

 

AppWeb

1.介绍

appWeb有两种许可,一种是GPL,免费的,另外一种是商业许可,有30天的试用期。免费的版本在 下载,appWeb的商业版本由Mbedthis公司发布和维护,网址是 appweb 是下一代嵌入式web服务器,它天生是为嵌入式开发的,它的最初设计理念就是安全。Appweb是一个快速、低内存使用量、标准库、方便的服务器。与其它嵌入式web服务器相比,appweb最大特点就是功能多和高度的安全保障。Appweb简单、方便、开源。

2.操作系统

    Linux, Windows, Mac OSX , Solaris

3.版本

    Appweb最新版本是appweb-src-2.2.2 ,大小1.195MB,解压后6.22MB

4.功能、特点

AppWeb提供的一些关键好处:

l         低开发成本。支持cgi/1.1javastriptespphp(4and5),加快开发进度。

l         最小的资源需求。一秒能响应3500个请求,非常迅速,并且紧凑(110KB)。

l         灵活的开发环境。Appweb高度模块化,可以根据需要取舍。

l         可靠性

具有的功能:

·         支持嵌入式JavaScriptespegicgiphp.

·         容易使用。 大量的例子文档可用。

·         安全支持SSL、认证。 Secure Socket Layer (SSL) including both client and server certificates. Digest and Basic Authentication. Sandbox directives to limit denial of service attacks.

·         模块化. Select only the features you need via dynamically loadable modules. Also supports granular source code compilation directives.

·         性能突出. Fastest performance in its class. Over 3500 requests per second on a PC class device. Memory footprint from 110K. Code and web pages are fully ROMable.

·         符合标准. AppWeb supports HTTP/1.0, HTTP/1.1, CGI/1.1, SSL RFC 2246, HTTP RFC 2617

·         方便. AppWeb has been ported to Linux, Windows, Mac OSX and Solaris and support the following CPU architectures: ARM7, MIPS32, i386/X86, PowerPC and Sparc

Feature Overview

Dynamic Content

  • (ESP)
  • (in-memory CGI)
  • PHP (4 and 5)

Embedded Server Pages

  • Server-side JavaScripting
  • Integrated session state management
  • Scripted generation of HTML
  • Extensible via new functions
  • Manage client state-data via sessions
  • Post-back paradigm. Same page for form and post logic

Security

  • Secure Sockets Layer (SSL)
  • Basic and Digest Authentication
  • Directory and URL location based authorization
  • Sandbox limits
  • Access and access violation logging

Modularity

  • Dynamic loading of modules
  • Extensible URL handlers
  • Extensible / replaceable authorization, SSL and script

Ease of Use

  • Apache-style configuration file
  • Debugging and trace logging
  • Packaged installations for Linux and Windows
  • Run as a service / daemon

Other Features

  • HTTP server and client access program
  • Named and IP based virtual hosts
  • Listen on multiple ports
  • Compile web pages and files into C code for execution from ROM

Standards

  • HTTP/1.1
  • CGI/1.1
  • Apache configuration file compatibility

Performance

  • Multithreaded with high performance thread pool 
  • Request throughput (> 3,500 requests per second)
  • Scales on multi-cpu systems
  • Small memory footprint even under heavy load (from 400K)

Developer Features

  • HTTP server and client libraries 
  • Shared and static libraries supplied
  • C and C++ APIs
  • Operate single-threaded or multithreaded (Compile or run-time selectable)
  • Easy, intuitive programming model
  • Integrate with common event mechanism: Windows Messages, Unix select, dedicated thread
  • Coding minimized as most features can be specified via the configuration file
  • Cookbook of samples (cut and paste to get going)
  • SMP safe
  • Extensive debug trace logging

     O'Brien describes AppWeb as a "mini-Apache" in part because it features compatibility with Apache configuration syntax. "One of our customers was able to solve a problem using Apache documentation from the Internet," O'Brien notes. AppWeb is not based on the apache codebase, however. "It's a clean implementation," says O'Brien. "It's really hard to shrink something down."


  AppWeb architecture

5.可执行文件大小、内存使用情况

    内存使用110KB Small memory footprint even under heavy load (from 400K)

官方网站

商业网站

 

Apache

最新的apache版本是httpd-2.2.4.tar6.07MB,解压后为27.2MB,在嵌入式web服务器中很少使用,在网上搜索看到有人在vxwork上用过apache,在其它方面没有,我认为,goaheadappweb具有丰富的功能,没有使用apache的必要。另一个原因是因为apache是一个多进程web服务器,使用的内存很多。

由于apacheprefork工作模式有关。每个apache进程只能同时服务于一个http连接。这种模式好处在于每个进程不互相干扰,稳定性好;缺点也建立在优点之上,就是占用资源多,即使每个进程只使用2M内存(如果使用了php,这点内存根本不够),100的并发连接就用掉200M的内存。

阅读(1013) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~