Node.Js, Python, Go Mostly stateless (except the Chat service) Heavy use of Amazon SQS to decouple some parts Data stores - DynamoDB, MongoDB, Elasticsearch, Aerospike, MySQL, Postgres, Redis, S3
Our architecture ts pretty well in Kubernetes world Containers good for packaging == repeatability++ Uni ed pool of resouces & bin-packing == utilization++ Quick container restarts + rescheduling == self-healing++
services, not so much after that move a relatively less important service rst, to deal with the unknowns move a complex service - if that works, everything else would work too supporting services, that hardly do anything now
pre-populated env vars or internal dns Service IPs don't change unless we delete and recreate the service Use internal dns only when we need the pod IPs directly (in DBs, for example) Protip: Create a service of type ExternalName - easy to set an alias that could be resolved via KubeDNS
magically make it awesome Make sure our apps have good healthchecks - k8s won't deploy bad code if you have failing healthchecks! Gracefully handle shutdown
node/pod failures Did you know? AWS provides a CMAAS (Chaos Monkey As a Service) It's called "running in US-EAST-1" Have at least one extra node than required, since new node takes a while to come up.
logs quickly! K8S creates symlinks to actual docker logs - with useful info in lenames POD-NAME_NAMESPACE_CONTAINER-NAME_CONTAINER-ID.log Be sure to monitor pod restarts! Check if it was OOM Killed, App Error or Healthcheck failure To run logging & monitoring agent, use Daemonsets https://github.com/ApsOps/filebeat-kubernetes
awesome This can get tricky though - attaching EBS volumes to nodes may not always work as quickly we expect it to Members coming-and-going are generally costly operations for most of the data stores Bottomline: we don't have to go all in with k8s. Evaluate your use-cases for persistent workloads, and have enough replicas
see the headers k8s has a sessionA nity, but it can't see the actual client IP Solution that just works - ELB w/ ProxyProtocol enabled --> intermediary nginx --> websocket app