How virtual but real architecture can help save your time and money

Krystian Różycki

Route Map

Route map

You are here

time ~30min

IaaS market share



 Cost Optimization


When people say that they don’t have time for the architecture it literally means that they don’t know what they are doing

IaaS market share

Main Cloud Infrastructure as a Service (IaaS) providers - worldwide

  • Amazon (AWS)
  • Microsoft (Azure)
  • Google (Google Cloud Platform)
  • Alibaba (Alibaba Cloud)
  • Oracle (Oracle Cloud)
  • IBM (IBM Cloud)

Gartner IaaS Magic Quadrant 2012

Gartner IaaS Magic Quadrant 2013

Gartner IaaS Magic Quadrant 2014

Gartner IaaS Magic Quadrant 2015

Gartner IaaS Magic Quadrant 2016

Gartner IaaS Magic Quadrant 2017

Gartner IaaS Magic Quadrant 2018

Why AWS still dominates the cloud market

  • According to a MarketWatch, “AWS has cut prices more than 50 times since its launch in 2006″
  • New infrastructure and innovations (since 2006 has progressed into a platform for databases, developer apps, tools, and analytics)
  • Has more than 1 million users including big name companies such as Netflix and Airbnb
  • Vast solutions for different needs all under one umbrella
  • Fast and easily scalable solutions

AWS Global Infrastructure

AWS Global Infrastructure

What is k8s?

  • Kubernetes (k8s) is an open-source system for automating deployment, scaling, and management of containerized applications.
  • Announced in mid-2014,  version 1.0 released on July 21, 2015
  • Developed by Google
  • On March 6, 2018, Kubernetes Project reached ninth place in commits at GitHub, and second place in authors and issues to the Linux kernel
  • Witten in GO Lang
  • Not only Docker



>kubectl get nodes
>kubectl get nodes -o wide


>kubectl get pods
>kubectl get pods -o wide


>kubectl scale --replicas 8 deployment frontend

Scale Up/Down

>kubectl set image deployment/frontend php-redis=rakieta/gb-frontend:v2
>kubectl rollout status deployment/frontend
>kubectl rollout undo deployment/frontend


>kubectl delete pod <pod-id>
>kubectl get pods

Self-healing - pods

>kubectl get nodes
>kubectl get pods -o wide

Self-healing - nodes

What we just saw?

  • Replication of pods and nodes (scalability)
  • Self-healing mechanism
  • Simple deployment example and how it works
  • Autoscale mechanism example:
    • Horizontal Pod Autoscaler (HPA) 
    • Cluster Autoscaler (CA)
  • Some tools and commands like:
    • eksctl 
    • kubectl
    • kube proxy
    • kubernetes-dashboard
    • merics-server

Amazon EKS Pricing

  • You pay $0.20 per hour for each Amazon EKS cluster that you create. You can use a single Amazon EKS cluster to run multiple applications by taking advantage of Kubernetes namespaces and IAM security policies.
  • You pay for AWS resources (e.g. EC2 instances or EBS volumes) you create to run your Kubernetes worker nodes. You only pay for what you use, as you use it; there are no minimum fees and no upfront commitments.

Cost Comparison

Direct Deployment (on-demand instances) $32,040 $50,882 $43,730
​Direct Deployment (70% reserved instances) $29,883 $37,974 $31,830
​Managed Kubernetes (EKS,GKE, AKS - on-demand instances) $30,874 $50,064 $42,048
Managed Kubernetes (EKS,GKE, AKS - 70% reserved instances) $28,718 $37,156 $30,148

100 Core, 400 GB Kubernetes cluster

of Kubernetes workloads run on AWS

- Cloud Native Computing Foundation


And many, many more...

AWS Lambda in short 


  • Introduced in November 2014
  • It's a Serverless solution
  • Executes only when needed
  • Scales automatically (from a few requests/day to
    thousands/ second)
  • Zero administration (server and operating system maintenance, capacity provisioning, automatic scaling, code monitoring, logging) this is done for You out of the box.
  • Runs your code on a high-availability compute infrastructure 
  • Really easy to use 

How it works? - simplyfied

Your Event

Your Code

stored on Your
S3 bucket






AWS Infrastructure

API Gateway

15 available events to choose from and the number is still growing...

Every call/trigger does the same thing (scale)

Serverless framework... a cool tool for developing/managing Your lambda

>sls create -t aws-python3 -p summit

Creating new lambda project

Code example

Code example


gives ability to store python requirements in requirements.txt or Pipfile

use docker to build requirements 

use API Gateway as lambda event trigger

Serverless: deployment

>sls deploy -v

AWS Lambda Pricing

  • You pay only for the compute time you consume - there is no charge when your code is not running
  • Free tier includes 1M free requests per month and 400,000 GB-seconds of compute time per month.
  • For example:
    • bill for 2M/128MB/400ms = $2.07/MTH or $0.20/MTH

See more at:



$0.20 per 1M

allocated memory / total time

Lambda vs EC2 - costs comparison

Setup and Configuration Lambda

Memory: 128 MB

Execution Limit: 30 sec

Permissions: Dynamo, S3 Access

Language: NodeJS

Setup and Configuration EC2

Instance Type: t2.micro

CPU: 1

Memory: 1GB

Language: NodeJS

A node server is created to listen on port 80.

Not only AWS

AWS Lambda Azure Functions GCP Functions Apache OpenWhisk
JavaScript(node.js) Yes Yes Yes Yes
Java Yes Yes No Yes (Partial)
C# Yes Yes No No
Python Yes Experimental No Yes
PHP No Experimental No Yes
Go Yes (Partial) No No No
F# No Yes No No
Swift No No No Yes

similar solution to lambda on different cloud providers

AWS Cost Optimization

Where is the leak...

I has been estimated that businesses waste average is around 30% of their cloud spend each year due to being charged for the services they do not use.

This is attributable to:

  • Overprovisioned and orphaned resources
  • Assigning resources to the wrong pricing structure
  • Leaving non-production resources running when they are not being used – typically those used for:
    • development
    • staging
    • testing.x

How to save some money while using cloud solutions?

  • Automate tear-down/creation of the non-production stacks (for example: dev stack to be available 7am-8pm) - it's easy to automate with lambda scheduled events
  • Checkout for best prices of EC2 and RDS types according to Your needs (storage/memory/CPU/OS/...)
  • Checkout for more information and pricing programs on AWS (Save when you reserve, Pay less by using more)
  • Use Autoscaling Groups (to scale up/ down EC2 instances when needed)
  • Consider using Kubernetes (or similar) when serving app for big number of users - saves resources (autoscale), can reduce Your DevOps team (self-healing mechanizm, simple deployment, easy configuration, etc.)
  • Consider using Serverless (AWS Lambda or similar) - as a backend for webapp, automation tool, etc.

Thank You