Add files via upload

This commit is contained in:
TimothyLottes
2016-11-10 08:23:50 -05:00
committed by GitHub
parent c4b7abe2ed
commit 09d705fa3d
2 changed files with 26 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
<html><head><link rel="stylesheet" href="style.css"></head><body><div class="page">
<h1>20121203 - Simple Custom Web Server Tricks</h1>
<br>
Building an ultra minimal web server for my side project. Here are some of the simplifications I'm making,<br>
<br>
(1.) Return the entire site and image content in the first reply to minimize first hit latency. Using the <a href="http://en.wikipedia.org/wiki/Data_URI_scheme">Data URI Scheme</a> to embed the images in the single html file directly. Then javascript for anything interactive.<br>
<br>
(2.) Skipping reading and parsing the browsers request. Simply returning the entire site reply for any request. This seems to work locally, will need to validate on a loaded machine serving real content. There is an open question if not reading from the socket and later closing will result in kernel buffers filling up. The reply includes the connection close header for HTTP/1.1,<br>
<br>
<tt>HTTP/1.1 200 OK<br>
Connection:close<br>
Content-Type:text/html<br>
Content-Length:....</tt><br>
<br>
(3.) If any other content needs to be linked, just use port number to choose content. This is continuing the "no parsing" overhead simplification.<br>
<br>
(4.) Keep content in memory with headers. Skips extra write() or copy.<br>
<br>
</div></body></html>
+1
View File
@@ -109,6 +109,7 @@ Below this is active random migration (416 prior posts still to filter through)
<a href="20130825.html">20130825 - Modern Memory Mapping</a><br>
<br>
<b>2012</b><br>
<a href="20121203.html">20121203 - Simple Custom Web Server Tricks</a><br>
<a href="20121001.html">20121001 - Linux Distros and Compression</a><br>
<a href="20120513.html">20120513 - Frame Stutter Reduction Via Time Smoothing</a><br>
<br>