All Projects → guangqianpeng → fancy

guangqianpeng / fancy

Licence: other
High performance web server

Programming Languages

c
50402 projects - #5 most used programming language
HTML
75241 projects
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to fancy

Lotos
tiny but high-performance HTTP Server
Stars: ✭ 140 (+600%)
Mutual labels:  http-server, epoll, network-programming
malloy
A C++ library providing embeddable server & client components for both HTTP and WebSocket.
Stars: ✭ 29 (+45%)
Mutual labels:  http-server, network-programming
Mgx
🌈 A high performance network framework written in c++ (support tcp and http)
Stars: ✭ 15 (-25%)
Mutual labels:  http-server, epoll
WebServer
High-performance multi-threaded tcp network server in c++11
Stars: ✭ 58 (+190%)
Mutual labels:  http-server, epoll
Gev
🚀Gev is a lightweight, fast non-blocking TCP network library based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers.
Stars: ✭ 1,082 (+5310%)
Mutual labels:  epoll, network-programming
Webserver
A C++ Lightweight Web Server based on Linux epoll
Stars: ✭ 135 (+575%)
Mutual labels:  epoll, network-programming
Webserver
A C++ High Performance Web Server
Stars: ✭ 4,164 (+20720%)
Mutual labels:  http-server, epoll
toyhttpd
I/O 模型练手代码,分别使用阻塞式 I/O、select、poll 和 epoll 和 Java NIO 实现了简单的 HTTP Server
Stars: ✭ 43 (+115%)
Mutual labels:  http-server, epoll
Zaver
Yet another fast and efficient HTTP server
Stars: ✭ 673 (+3265%)
Mutual labels:  http-server, epoll
Webcpp
用C++开发web服务器框架
Stars: ✭ 23 (+15%)
Mutual labels:  http-server, epoll
Envelop.c
🌊 Thread-less, event-loop based tiny http-server from scratch using epoll. Learning Purpose.
Stars: ✭ 75 (+275%)
Mutual labels:  http-server, epoll
Tkeed
🌎 High Performance HTTP WebServer
Stars: ✭ 485 (+2325%)
Mutual labels:  epoll, network-programming
connect
tiny cross-platform socket API library
Stars: ✭ 46 (+130%)
Mutual labels:  epoll, network-programming
BCA-Phantom
A multi-platform HTTP(S) Reverse Shell Server and Client in Python 3
Stars: ✭ 80 (+300%)
Mutual labels:  http-server, network-programming
Facebooc
Yet another Facebook clone written in C
Stars: ✭ 483 (+2315%)
Mutual labels:  http-server, epoll
Libhv
🔥 比libevent、libuv更易用的国产网络库。A c/c++ network library for developing TCP/UDP/SSL/HTTP/WebSocket client/server.
Stars: ✭ 3,355 (+16675%)
Mutual labels:  http-server, epoll
Mongols
C++ high performance networking with TCP/UDP/RESP/HTTP/WebSocket protocols
Stars: ✭ 250 (+1150%)
Mutual labels:  http-server, epoll
public
BitDust project source codes : official Public Git repository (mirror on GitHub) : https://bitdust.io
Stars: ✭ 19 (-5%)
Mutual labels:  network-programming
mirror-http-server
A dummy HTTP server that responds whatever you told it to
Stars: ✭ 35 (+75%)
Mutual labels:  http-server
edap
No description or website provided.
Stars: ✭ 22 (+10%)
Mutual labels:  http-server

fancy: A high performance web server

Build Status

简介

fancy是一个基于事件驱动(epoll)的多进程web服务器. 其原理与Nginx类似,即 one loop per process. 除去测试部分代码,fancy代码量约为4000行. fancy的主要特性有:

  • epoll+nonblocking IO. epoll是编写高性能服务器的基础设施,Nginx和muduo库都采用了epoll.(event.c & connection.c

  • 反向代理HTTP服务器. 简单来说就是转发HTTP request and response.(upstream.c & http.c)

  • 支持chunked transfer encoding.(chunk_reader.c

  • 踢掉空闲连接. fancy使用红黑树实现定时器, 并用于踢掉空闲连接.(rbtree.c & timer.c

  • 自适应buffer. TCP连接的读写必须有用户态buffer。fancy参考了muduo库buffer类的设计,实现了一个简易的自适应buffer. 此外,对于长连接,buffer可以重用.(buffer.c

  • 协议解析. 使用状态机解析http request和response。在极端情况下,请求会1个字节1个字节地发送。fancy在解析时会记录一个状态变量,这样每次解析都从从先前的状态开始.(http_parser.c

  • 使用内存池(palloc.c)来简化内存管理.

  • 配置文件. fancy 的配置文件风格与Nginx一致.(config.c)

使用

git clone https://github.com/guangqianpeng/fancy.git
cd fancy
./build.sh && ./build.sh install
cd install
./fancy
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].