CSCI 420 - Operating Systems & Concurrency

Spring 2017

Rust Web Server, part 2


In this assignment, we will enhance the web server previously developed. A big part of this assignment is performance assessment of different variations. To facilitate this, I strongly recommend that you maintain multiple versions of your server using git. Note that you can use Github desktop without hosting your code on Github. If you do use Github, ensure that your repository is private. Follow these steps:
  1. Modify your program to handle a GET request for multiple files at once. The server should send each of the requested files. Here is an example of such a request:
    GET /index.html
    User-Agent: httperf/0.9.1
    Host: localhost
  2. Modify your program so that each file in a multi-GET request is handled by a separate thread.
  3. Devise at least three different performance workloads using httperf, which is installed on the Linux machines. Note that, in general, it is best to run httperf on a different machine than that which is running your server. Each of your workloads should represent a different type of stress on the server. Type man httperf to see the full documentation. Here are some examples of using httperf:
    httperf --server localhost --port 8888 --uri /index.html
    httperf --server localhost --port 8888 --num-conns 100 --uri /index.html
    httperf --server localhost --port 8888 --num-conns 10 --wlog=y,./test2.txt
    In the last case, the file test2.txt looks like this:
  4. Implement and assess at least three of the following ideas for improving the performance of your server:
  5. Document your performance workloads and your assessment results. Discuss in this document which combinations of improvements were most effective in comparison with your baseline implementation from Step 1 (and with each other).
Submit each version of your web server that you tested, along with a PDF of your assessment document, via Moodle.


Steps 1 and 2 are each worth 10 points. Each part of Step 4 is worth 5 points. Any variation beyond the third is worth 5 points extra credit. The final assessment document is worth 15 points; in addition, full credit for the other steps depends on the content of the document, so don't forget to do it! Therefore, the total value of the assignment is 50 points. No credit will be given for code that fails to compile. Partial credit may be given for incomplete or flawed versions of a given step.


This assignment was adapted from materials developed by David Evans at the University of Virginia.