3 ms·
Which aspects of HTTP strike you as particularly elegant or well-designed?
by gue5t 9y ago
Which aspects of HTTP strike you as particularly elegant or well-designed?
- hinkley 9y agoAmong the things I care about are clock skew issues in distributed systems. Over and over again I've had to explain to people that they don't need their hand-rolled solution because a better solution has been in HTTP since 1.0 for purposes of cache invalidation. It's as accurate as NTP without opening up an attack vector (hijacking NTP or NTP DOS). Any time you contact a server your User Agent tells it what time it is. Any time the server responds it does the same. Both parties can calculate offsets just fine with just the HTTP headers. The only consensus that matters is between the hub and one spoke. When the server says "It's 12 noon and this response document was generated at 11:58:50" you know it was 70 seconds ago. Nevermind that your browser thinks it's currently 4:30 pm. The age of the file is 'now' - 70 seconds. If you PUT a file at 4:35 the server will say it was created at 12:05. Anyway, this is my favorite thing about the HTTP protocol. Human readable from traffic dumps was #2.