Beyond HTTP, Breaking Free of The Web

Ebf974e0dbcfe88c508df6f395661a4b?s=47 Mark Wolfe
February 09, 2015

Beyond HTTP, Breaking Free of The Web

Talk I gave at APIdays in Sydney 2015 and Microservices Meetup

Ebf974e0dbcfe88c508df6f395661a4b?s=128

Mark Wolfe

February 09, 2015
Tweet

Transcript

  1. 2.
  2. 3.

    –From https://tools.ietf.org/html/rfc2616 “The Hypertext Transfer Protocol (HTTP) is an application

    protocol for distributed, collaborative, hypermedia information systems.”
  3. 4.
  4. 5.

    APIs We Use != http DNS Used to resolve host

    names Also used for service discovery MDNS SPDY
  5. 6.

    Wireshark Network protocol analyser Our window into the wonderful world

    of protocols and APIs Available for Windows, OSX and Linux https://www.wireshark.org/ The wire doesn’t lie
  6. 7.

    DNS? Protocol uses UDP or TCP for transport Consists of

    Questions and Answers Includes some information on authority Uses "intelligent retransmission” Small messages
  7. 8.

    DNS Continued.. Binary protocol Fixed header Payload uses a compact

    self describing binary format TLV (type length value)
  8. 13.

    In Review Compact messages More likely to transit “wireless” networks

    Extensible self describing binary payload Established encoding so others can introspect without a definition! Fast
  9. 14.

    MDNS Uses UDP Over Multicast Designed for resolving names in

    adhoc networks Uses the existing DNS message structure, name syntax, and resource record types
  10. 15.

    Something Simpler? So lets look at something simpler than DNS

    What if we just put text in a UDP packet What would that look like?
  11. 16.

    Problem I want to send 10s of 1000s of metrics

    to a server for aggregation with minimal performance impact I want to keep it simple I want the server to be a staging area for data Perform Aggregation Flush to timeseries at regular intervals
  12. 17.

    statsd Developed by etsy Uses UDP as a transport Data

    is encoded using text Metrics are either a Gauge, Counter, Timer or Meter No reply necessary!
  13. 18.

    statsd protocol Metrics are generally of the form <metric name>:<value>|<type>

    outside_temp|12.2|g get_home_request_time|123|ms get_home_request|1|c
  14. 19.

    In Review Very simple implementation Doesn’t block Fast Loss doesn’t

    really matter in the scheme of things Maths happens in the server
  15. 20.
  16. 22.

    Links Good article on DNS message format https://www.wireshark.org/ Read this

    book High Performance Browser Networking Etsy Statsd