93

GitHub - diracdeltas/FastestWebsiteEver: ultrafast single TCP packet audio/visua...

 6 years ago
source link: https://github.com/diracdeltas/FastestWebsiteEver
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

what is this?

the greatest website to ever fit in a single TCP packet

optimizations

  • HTTP compression: choose DEFLATE over GZIP because most browsers accept raw DEFLATE output without a header or checksum so it's shorter/faster. #yolo
  • send response immediately after TCP session init: avoids 1 round trip (not to spec, seems to confuse Chrome results in Wireshark).
  • SO_BUSY_POLL: asks the kernel to poll for packets for a given amount of time.
  • TCP_NODELAY: disable Nagle's algorithm.
  • echo 1 > /proc/sys/net/ipv4/tcp_low_latency: TCP stack makes decisions that prefer lower latency as opposed to higher throughput.
  • favicon: reduced gif to 1/2 original frame count, applied lossy LZW compression.
  • HTML mangling: closing tags are for losers.
  • bespoke webserver written in C
  • remove GIF comment extension block, saving 36 bytes (thanks Samy Kamkar)

who made this?

eV ([email protected]), yan ([email protected])

Get in touch today to hear about our 120-byte ad sponsorship opportunities!

credits


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK