FULLSTACK TECH RADAR DAY
The #2nd_half
Scaling to the #next2
Haggai Philip Zagury, DevOps Group & Tech Lead
FULLSTACK TECH RADAR DAY
Who we are
Tikal helps ISV’s in Israel & abroad in their technological
challenges.
Our Engineers are Fullstack Developers with expertise in Android,
DevOps, Java, JS, Python, ML
We are passionate about technology and specialise in
OpenSource technologies.
Our Tech and Group leaders help establish & enhance existing
software teams with innovative & creative thinking.
https://www.meetup.com/full-stack-developer-il/
FULLSTACK TECH RADAR DAY
Haggai Philip Zagury - DevOps Group & Tech lead
My open thinking and open techniques ideology is driven by
Open Source technologies and the collaborative manner defining
my M.O.
My solution driven approach is strongly based on hands-on and
deep understanding of Operating Systems, Applications stacks and
Software languages, Networking, Cloud in general and today more
and more Cloud Native solutions.
FULLSTACK TECH RADAR DAY
Planning a data pipeline (with constraints)
● An event driven application
FULLSTACK TECH RADAR DAY
Planning a data pipeline (with constraints)
● An event driven application
● High Resolution Video Streams from multiple locations
● Plan for 10s of simultaneous sources …
Digest
FULLSTACK TECH RADAR DAY
Planning a data pipeline (with constraints)
● An event driven application
● High Resolution Video Streams from multiple locations
● Plan for 10s of simultaneous sources …
● Data enrichment pipelines
Digest Enrich
FULLSTACK TECH RADAR DAY
Planning a data pipeline (with constraints)
● An event driven application
● High Resolution Video Streams from multiple locations
● Plan for 10s of simultaneous sources …
● Data enrichment pipelines
● Output an HD display in near real-time (+- 8sec)
Digest Enrich
FULLSTACK TECH RADAR DAY
@scale - point #1
● The board emphasises a perquisite that
we have unlimited resources to
complete the task …
● Which isn’t the case in real-life …
FULLSTACK TECH RADAR DAY
@scale - point #2
● If you have a consistent measurable unit
● you can plan your journey to the next
square either by:
● Being more Efficient
● Doubling* your compute power
(not accurate will explain later why)
FULLSTACK TECH RADAR DAY
Planning a data pipeline - starting point
● The scale is not predictable …
● As you grow so does your supporting
services …
● Dealing with debug logs in a section
of a cluster means 6 times network
traffic
FULLSTACK TECH RADAR DAY
Planning a data pipeline - reality
● The scale is not predictable …
● As you grow so does your supporting
services …
● Dealing with debug logs in a section
of a cluster means 6 times network
traffic
● Deployment complexity increases …
FULLSTACK TECH RADAR DAY
FULLSTACK TECH RADAR DAY
The cloud is your friend
● Managed Services
● Solving Complexity of operation
● Increases/Decreases Price (in most
cases)
● Pay as You go …
● Polyglottism / “Architecture captivity“
FULLSTACK TECH RADAR DAY
Solution
FULLSTACK TECH RADAR DAY
Solution
How to store data for
optimised
r/w procedures
55,000 read requests per second
Hitting S3 Limit on >=10 simultaneous streams
FULLSTACK TECH RADAR DAY
Solution
How to store data for
optimised
r/w procedures
55,000 read requests per second
Hitting S3 Limit on >=10 simultaneous streams
# Complexitynext2
FULLSTACK TECH RADAR DAY
Solution
FULLSTACK TECH RADAR DAY
Solution
Performance ?
FULLSTACK TECH RADAR DAY
Solution
Performance ?
#2nd_half ?
FULLSTACK TECH RADAR DAY
VM vs Container*
Performance ?
Less ComplexityMore Complexity Gpu/Tpu
FULLSTACK TECH RADAR DAY
Solution
FULLSTACK TECH RADAR DAY
Solution
* is on the network !
FULLSTACK TECH RADAR DAY
Solve drift … with “money”
● 1 frame (of 45MB) * 30 frames per sec = 1350 MB == 1.35 GB == 10.8 Gb
> 10 Gb
FULLSTACK TECH RADAR DAY
EC2 Network performance comparison
● Worth a read on ec2 network performance
○ https://docs.google.com/spreadsheets/d/1N2xQqry-
zAKnK6FtW8X5zBYhMiFFnuMySMpx7f3K60s/edit?usp=sharing
○ https://cloudonaut.io/ec2-network-performance-cheat-sheet/
FULLSTACK TECH RADAR DAY
Solution
* is on the network !
FULLSTACK TECH RADAR DAY
Solution
Multi-tenancy ?
who did what, when ?
FULLSTACK TECH RADAR DAY
Resource Tags are your friend !
● Tagging resources
● Putting price tags on operations !
● How much did pipeline1 cost ?
● Can I do it faster ? [ Time ]
● Each enrichment service has it’s own
cluster optimised for Compute unit sizes
staging
stream
infra
FULLSTACK TECH RADAR DAY
Solution
FULLSTACK TECH RADAR DAY
#2nd_half or # issues …next2
Justin Ryan
https://qconsf.com/sf2019/presentation/scaling-patterns-netflixs-edge
Scaling Patterns for Netflix's Edge
FULLSTACK TECH RADAR DAY
#2nd_half or # issues …next2
https://www.infoq.com/presentations/efficiency-better-software-faster/
Todd Montgomery
Todd Montgomery explores the everyday things that those with an eye to
performance and efficiency do that can be leveraged by anyone to build better software faster.
FULLSTACK TECH RADAR DAY
Compute
Buffet ;)
● Taken @SFO
Nov 2019
UNDER
THE
HOOD
FULLSTACK TECH RADAR DAY
So building distributed systems is hard
FULLSTACK TECH RADAR DAY
So building distributed systems is hard
FULLSTACK TECH RADAR DAY
The #2nd half/ # solution(s)next2
● What is the 2nd half of the table problem(s)
● ***** real-life scenario !
● Scale ability -> Capacity planning in the “Container Orchestration Era”
● (in the past Marathon) Kubernetes
● FaaS (e.g. AWS Lambda)
● Nomad
FULLSTACK TECH RADAR DAY
Lego for the masses
● Solves Complexity (i know debatable …)
● 1 size fit all
background image by @hagzag
FULLSTACK TECH RADAR DAY
Commoditize compute unit management
kubectl get deploy -n kube-system
cert-manager 1/1 1 1 58d
cert-manager-cainjector 1/1 1 1 58d
cert-manager-webhook 1/1 1 1 58d
coredns 2/2 2 2 173d
enternal-dns-prod-external-dns 1/1 1 1 171d
kube-slack 1/1 1 1 173d
tiller-deploy 1/1 1 1 173d
FULLSTACK TECH RADAR DAY
Resource Limits apiVersion: v1
kind: Pod
metadata:
name: frontend
spec:
containers:
- name: db
image: mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: "password"
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: test-network-policy
namespace: default
spec:
podSelector:
matchLabels:
role: db
policyTypes:
- Ingress
- Egress
ingress:
- from:
- ipBlock:
cidr: 172.17.0.0/16
except:
- 172.17.1.0/24
- namespaceSelector:
matchLabels:
project: myproject
- podSelector:
matchLabels:
Resource Limits
FULLSTACK TECH RADAR DAY
Time Days Minuets Seconds Milliseconds
Cost
Agility
Scalability
https://www.slideshare.net/BryanMcAninch/the-faas-and-the-curious-86874211
FULLSTACK TECH RADAR DAY
Make the best of what you have ?
● Be more accurate / precise in what you do !
● Measuring techniques (that scale)
FULLSTACK TECH RADAR DAY
Guess what ?
They both get to Eilat !
FULLSTACK TECH RADAR DAY
Keep Efficiency in mind
Time
Price
Complexity
Define your Quantifiable unit !
FULLSTACK TECH RADAR DAY
F
● A Fixed unit size Grid == FaaS
FULLSTACK TECH RADAR DAY
Solving complexity …
FULLSTACK TECH RADAR DAY
Load Shifting & Peak Shaving
FULLSTACK TECH RADAR DAY
Keep Efficiency in mind
Time
Price
Complexity
Define your Quantifiable unit !
Thank you for taking the Time !

The 2nd half. Scaling to the next^2

  • 1.
    FULLSTACK TECH RADARDAY The #2nd_half Scaling to the #next2 Haggai Philip Zagury, DevOps Group & Tech Lead
  • 2.
    FULLSTACK TECH RADARDAY Who we are Tikal helps ISV’s in Israel & abroad in their technological challenges. Our Engineers are Fullstack Developers with expertise in Android, DevOps, Java, JS, Python, ML We are passionate about technology and specialise in OpenSource technologies. Our Tech and Group leaders help establish & enhance existing software teams with innovative & creative thinking. https://www.meetup.com/full-stack-developer-il/
  • 3.
    FULLSTACK TECH RADARDAY Haggai Philip Zagury - DevOps Group & Tech lead My open thinking and open techniques ideology is driven by Open Source technologies and the collaborative manner defining my M.O. My solution driven approach is strongly based on hands-on and deep understanding of Operating Systems, Applications stacks and Software languages, Networking, Cloud in general and today more and more Cloud Native solutions.
  • 5.
    FULLSTACK TECH RADARDAY Planning a data pipeline (with constraints) ● An event driven application
  • 6.
    FULLSTACK TECH RADARDAY Planning a data pipeline (with constraints) ● An event driven application ● High Resolution Video Streams from multiple locations ● Plan for 10s of simultaneous sources … Digest
  • 7.
    FULLSTACK TECH RADARDAY Planning a data pipeline (with constraints) ● An event driven application ● High Resolution Video Streams from multiple locations ● Plan for 10s of simultaneous sources … ● Data enrichment pipelines Digest Enrich
  • 8.
    FULLSTACK TECH RADARDAY Planning a data pipeline (with constraints) ● An event driven application ● High Resolution Video Streams from multiple locations ● Plan for 10s of simultaneous sources … ● Data enrichment pipelines ● Output an HD display in near real-time (+- 8sec) Digest Enrich
  • 9.
    FULLSTACK TECH RADARDAY @scale - point #1 ● The board emphasises a perquisite that we have unlimited resources to complete the task … ● Which isn’t the case in real-life …
  • 10.
    FULLSTACK TECH RADARDAY @scale - point #2 ● If you have a consistent measurable unit ● you can plan your journey to the next square either by: ● Being more Efficient ● Doubling* your compute power (not accurate will explain later why)
  • 11.
    FULLSTACK TECH RADARDAY Planning a data pipeline - starting point ● The scale is not predictable … ● As you grow so does your supporting services … ● Dealing with debug logs in a section of a cluster means 6 times network traffic
  • 12.
    FULLSTACK TECH RADARDAY Planning a data pipeline - reality ● The scale is not predictable … ● As you grow so does your supporting services … ● Dealing with debug logs in a section of a cluster means 6 times network traffic ● Deployment complexity increases …
  • 13.
  • 14.
    FULLSTACK TECH RADARDAY The cloud is your friend ● Managed Services ● Solving Complexity of operation ● Increases/Decreases Price (in most cases) ● Pay as You go … ● Polyglottism / “Architecture captivity“
  • 15.
  • 16.
    FULLSTACK TECH RADARDAY Solution How to store data for optimised r/w procedures 55,000 read requests per second Hitting S3 Limit on >=10 simultaneous streams
  • 17.
    FULLSTACK TECH RADARDAY Solution How to store data for optimised r/w procedures 55,000 read requests per second Hitting S3 Limit on >=10 simultaneous streams # Complexitynext2
  • 18.
  • 19.
    FULLSTACK TECH RADARDAY Solution Performance ?
  • 20.
    FULLSTACK TECH RADARDAY Solution Performance ? #2nd_half ?
  • 21.
    FULLSTACK TECH RADARDAY VM vs Container* Performance ? Less ComplexityMore Complexity Gpu/Tpu
  • 22.
  • 23.
    FULLSTACK TECH RADARDAY Solution * is on the network !
  • 24.
    FULLSTACK TECH RADARDAY Solve drift … with “money” ● 1 frame (of 45MB) * 30 frames per sec = 1350 MB == 1.35 GB == 10.8 Gb > 10 Gb
  • 25.
    FULLSTACK TECH RADARDAY EC2 Network performance comparison ● Worth a read on ec2 network performance ○ https://docs.google.com/spreadsheets/d/1N2xQqry- zAKnK6FtW8X5zBYhMiFFnuMySMpx7f3K60s/edit?usp=sharing ○ https://cloudonaut.io/ec2-network-performance-cheat-sheet/
  • 26.
    FULLSTACK TECH RADARDAY Solution * is on the network !
  • 27.
    FULLSTACK TECH RADARDAY Solution Multi-tenancy ? who did what, when ?
  • 28.
    FULLSTACK TECH RADARDAY Resource Tags are your friend ! ● Tagging resources ● Putting price tags on operations ! ● How much did pipeline1 cost ? ● Can I do it faster ? [ Time ] ● Each enrichment service has it’s own cluster optimised for Compute unit sizes staging stream infra
  • 29.
  • 30.
    FULLSTACK TECH RADARDAY #2nd_half or # issues …next2 Justin Ryan https://qconsf.com/sf2019/presentation/scaling-patterns-netflixs-edge Scaling Patterns for Netflix's Edge
  • 31.
    FULLSTACK TECH RADARDAY #2nd_half or # issues …next2 https://www.infoq.com/presentations/efficiency-better-software-faster/ Todd Montgomery Todd Montgomery explores the everyday things that those with an eye to performance and efficiency do that can be leveraged by anyone to build better software faster.
  • 32.
    FULLSTACK TECH RADARDAY Compute Buffet ;) ● Taken @SFO Nov 2019
  • 33.
  • 34.
    FULLSTACK TECH RADARDAY So building distributed systems is hard
  • 35.
    FULLSTACK TECH RADARDAY So building distributed systems is hard
  • 36.
    FULLSTACK TECH RADARDAY The #2nd half/ # solution(s)next2 ● What is the 2nd half of the table problem(s) ● ***** real-life scenario ! ● Scale ability -> Capacity planning in the “Container Orchestration Era” ● (in the past Marathon) Kubernetes ● FaaS (e.g. AWS Lambda) ● Nomad
  • 37.
    FULLSTACK TECH RADARDAY Lego for the masses ● Solves Complexity (i know debatable …) ● 1 size fit all background image by @hagzag
  • 39.
    FULLSTACK TECH RADARDAY Commoditize compute unit management kubectl get deploy -n kube-system cert-manager 1/1 1 1 58d cert-manager-cainjector 1/1 1 1 58d cert-manager-webhook 1/1 1 1 58d coredns 2/2 2 2 173d enternal-dns-prod-external-dns 1/1 1 1 171d kube-slack 1/1 1 1 173d tiller-deploy 1/1 1 1 173d
  • 40.
    FULLSTACK TECH RADARDAY Resource Limits apiVersion: v1 kind: Pod metadata: name: frontend spec: containers: - name: db image: mysql env: - name: MYSQL_ROOT_PASSWORD value: "password" resources: requests: memory: "64Mi" cpu: "250m" limits: memory: "128Mi" cpu: "500m"
  • 41.
    apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name:test-network-policy namespace: default spec: podSelector: matchLabels: role: db policyTypes: - Ingress - Egress ingress: - from: - ipBlock: cidr: 172.17.0.0/16 except: - 172.17.1.0/24 - namespaceSelector: matchLabels: project: myproject - podSelector: matchLabels: Resource Limits
  • 42.
    FULLSTACK TECH RADARDAY Time Days Minuets Seconds Milliseconds Cost Agility Scalability https://www.slideshare.net/BryanMcAninch/the-faas-and-the-curious-86874211
  • 43.
    FULLSTACK TECH RADARDAY Make the best of what you have ? ● Be more accurate / precise in what you do ! ● Measuring techniques (that scale)
  • 44.
    FULLSTACK TECH RADARDAY Guess what ? They both get to Eilat !
  • 45.
    FULLSTACK TECH RADARDAY Keep Efficiency in mind Time Price Complexity Define your Quantifiable unit !
  • 46.
    FULLSTACK TECH RADARDAY F ● A Fixed unit size Grid == FaaS
  • 47.
    FULLSTACK TECH RADARDAY Solving complexity …
  • 48.
    FULLSTACK TECH RADARDAY Load Shifting & Peak Shaving
  • 49.
    FULLSTACK TECH RADARDAY Keep Efficiency in mind Time Price Complexity Define your Quantifiable unit ! Thank you for taking the Time !