Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Beyond HTTP, Breaking Free of The Web

Mark Wolfe
February 09, 2015

Beyond HTTP, Breaking Free of The Web

Talk I gave at APIdays in Sydney 2015 and Microservices Meetup

Mark Wolfe

February 09, 2015
Tweet

More Decks by Mark Wolfe

Other Decks in Technology

Transcript

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

    protocol for distributed, collaborative, hypermedia information systems.”
  2. APIs We Use != http DNS Used to resolve host

    names Also used for service discovery MDNS SPDY
  3. 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
  4. DNS? Protocol uses UDP or TCP for transport Consists of

    Questions and Answers Includes some information on authority Uses "intelligent retransmission” Small messages
  5. DNS Continued.. Binary protocol Fixed header Payload uses a compact

    self describing binary format TLV (type length value)
  6. 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
  7. MDNS Uses UDP Over Multicast Designed for resolving names in

    adhoc networks Uses the existing DNS message structure, name syntax, and resource record types
  8. 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?
  9. 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
  10. 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!
  11. 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
  12. In Review Very simple implementation Doesn’t block Fast Loss doesn’t

    really matter in the scheme of things Maths happens in the server
  13. Links Good article on DNS message format https://www.wireshark.org/ Read this

    book High Performance Browser Networking Etsy Statsd