programming for hostile environments
play

Programming for Hostile Environments Our adversary: bare metal - PowerPoint PPT Presentation

Programming for Hostile Environments Our adversary: bare metal infrastructure June 2018 About Me Nathan Goulding, SVP Engineering ~15 years frontline engineer for infrastructure/cloud and media companies Currently lead engineering team at


  1. Programming for Hostile Environments Our adversary: bare metal infrastructure June 2018

  2. About Me Nathan Goulding, SVP Engineering ~15 years frontline engineer for infrastructure/cloud and media companies Currently lead engineering team at Packet me = n+3 @NathanGoulding / nathan@packet.net

  3. What Packet Does “serverless” We automate bare metal, physical infrastructure (still runs on a server) Founded in 2014 by infrastructure geeks Over 15,000 users APP x86 and ARM CPU architectures 16 locations around the world CONTAINER 20 supported operating systems HYPERVISOR 50,000 installs per month SERVERS @NathanGoulding / nathan@packet.net

  4. “DRIVERLESS” @NathanGoulding / nathan@packet.net

  5. Programming for Hostile Environments Topics we’ll cover: Transitioning from monolith (ruby) to microservices (golang) Turning antipatterns into patterns Applied best practices Goals we set for ourselves Ephemeral nanoservices @NathanGoulding / nathan@packet.net

  6. Hostility of the Environment APP CONTAINER HYPERVISOR SERVER @NathanGoulding / nathan@packet.net

  7. The Problem, Abstract packet.net / @packethost

  8. Out-of-band Datacenter #1 DHCP Power Control VPN PORTAL Bare metal racks Metadata OS Images REST API Out-of-band Datacenter #2 IPAM DHCP DNS Power Control VPN Bare metal racks Metadata OS Images @NathanGoulding / nathan@packet.net

  9. From monolith to microservices API MAGNUM IP PB&J TINKERBELL KANT OSIE Multi-Tenant Power and DHCP & iPXE EC2 Style In Memory Internal and IPAM Boot Control Server Metadata Installation External Services Environment Client Portal S.O.S DOORMAN SOREN NARWHAL PENSIEVE Device, Project, Billing, Serial Console Customer Sflow Agg Physical Switch Forward and Out of Bound Token Management & Analysis Automation Backend rDNS Access VPN @NathanGoulding / nathan@packet.net

  10. Moving to golang Compiled Static typing Very little “magic” The best of prior programming languages minus the cruft @NathanGoulding / nathan@packet.net

  11. An emerging pattern

  12. An emerging pattern @NathanGoulding / nathan@packet.net

  13. Best Practices, in Practice #1 - gRPC for communication / rpc #2 - Get your data as close to where you need it as quickly as possible #3 - Don’t hide code you don’t like @NathanGoulding / nathan@packet.net

  14. #1 gRPC for communication / rpc Handles backoff / retry Straightforward service definition for request / response Streaming data and authentication via SSL Paradigm for dealing with message format changes packet.net / @packethost

  15. #2 Get data close to where it needs to be, quickly The network is unreliable, the network is unreliable, the network is unreliable Speed up access times + experience for everyone Be careful of “I’ll just request it (remotely) whenever I need it” packet.net / @packethost

  16. #3 Don’t hide code you don’t like Don’t use interfaces / providers to hide code you wish didn’t exist Use drivers / implementations where it counts packet.net / @packethost

  17. Why Does it Matter? @NathanGoulding / nathan@packet.net

  18. Goal #1: Can we provision in under 60 seconds? @NathanGoulding / nathan@packet.net

  19. Provisioning Timing Distribution @NathanGoulding / nathan@packet.net

  20. Provisioning Timeline @NathanGoulding / nathan@packet.net

  21. @NathanGoulding / nathan@packet.net

  22. Ephemeral Nanoservices Function Job Nanoservice Microservice Monolith Ephemeral ✓ ✓ ✓ ✕ ✕ Encapsulated ✓ ✓ ✓ ✓ ✕ Logging ? ✓ ✓ ✓ ✓ Complex tasks ✓ ✓ ✓ ✓ ✕ Monitored ✓ ✓ ✓ ✕ ✕ @NathanGoulding / nathan@packet.net

  23. Nanoservice Use Cases Services that have complex tasks or functionality to perform, and... Need to communicate with other services, and... Need to be kept up and running, but... Will never be used past their “life” Analogy: an ephemeral nanoservice is an “instantiation” of a microservice @NathanGoulding / nathan@packet.net

  24. Goal #2: Can we go a full day without a single provisioning failure? @NathanGoulding / nathan@packet.net

  25. @NathanGoulding / nathan@packet.net

  26. What’s next? #1 - Flexible workflows via directed graphs #2 - Distributed tracing for service logs @NathanGoulding / nathan@packet.net

  27. Q&A (we're hiring) @NathanGoulding / nathan@packet.net

Recommend


More recommend