Skip to content

Latest commit

 

History

History
41 lines (23 loc) · 1.57 KB

README.md

File metadata and controls

41 lines (23 loc) · 1.57 KB

Tinywebserver - Toy web servers based on different concurrent models

Tinywebserver, implements three kinds of web servers, aims to benchmark the performance of concurrent models - prefork, multi-thread, and IO-multiplex. Tinywebserver is built upon the demo program in the textbook Computer Systems: A Programmer's Perspective, and extends to the multi-thread and epoll models.

Tinyserver is by no means a production software. However, it surpports a number of basic functions, e.g. handling requests of plain text, html, jpeg, gif, and cgi.

  • Install:

      $ cd src/
      $ make
    

If installed correctly, three tinyservers would be generated, tinyserver_prefork, tinyserver_thread, and tiny_epoll, respectively. In addition, a demo cgi program would be built in the directory cgi-bin.

  • Uninstall

      $ make clean
    
  • Usage

    • To start. ./tinyservername port. For example,

        $ ./tinyserver_prefork 8000
      
    • To stop.

        $ Ctrl+C
      
    • Typing URL in your browser.

  • Benchmark using third-party facilities Each tinyserver program could be benchmarked by regular test tools, e.g. Apache AB

enjoy!