Skip to content

An implementation of RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1 (Learning Log)

Notifications You must be signed in to change notification settings

wangqingjia1999/HttpServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

High performance HTTP/1.1 server on Linux.

Contents

Background

Originally, this repo is just a barebone HTTP/1.1 server with terribly performance. One day, an idea hit me. I wanna a website that can display the real-life usage of words or phrases that appeared in reliable materials like news websites because I've beening learning English for many years and I stillllll have so much uncertainty in the language. I major in English not Computer Science, English language is really important in my daily life 😛. And by the way, the news database is downloaded from 2.7 million news articles and essays. The Sqlite3 database used in demo is just a tiny part of this huge dataset.

Demo

You can easily look up an English word/phrase by typing it into the search bar( Ignore the bad-looking home page ) and click "Go" to search for it.

home-page

It will highlights the word/phrase that you search. And you can further go into the original page by clicking on the hyper-link at the right side of each entity.

query-result

Benchmark

Benchmark is done with the help of siege

Recent benchmark with terribly bad performance :^)

Transactions:                   6732 hits
Availability:                 100.00 %
Elapsed time:                  59.89 secs
Data transferred:              76.16 MB
Response time:                  8.23 secs
Transaction rate:             112.41 trans/sec
Throughput:                     1.27 MB/sec
Concurrency:                  925.22
Successful transactions:        6732
Failed transactions:               0
Longest transaction:           11.36
Shortest transaction:           0.00

Build Environment

How to build?

git clone https://github.com/Bitate/HttpServer
cd HttpServer
bash build.sh

Useful links that help me build this project

HTTP Related

About

An implementation of RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1 (Learning Log)

Resources

Stars

Watchers

Forks