Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos,...

57
Real-Time Analytics Meets Kubernetes Tal Doron Director, Technology Innovation

Transcript of Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos,...

Page 1: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Real-Time Analytics Meets Kubernetes

Tal DoronDirector, Technology Innovation

Page 2: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Tal Doron

Director, Technology Innovation

ABOUT ME

@taldoron

taldoron84

[email protected]

Page 3: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

We provide one of the leading in-memory computing platforms for real-time insight to action and extreme transactional processing. With GigaSpaces, enterprises can operationalize machine learning and transactional processing to gain real-time insights on their data and act upon them in the moment.

About GigaSpacesDirect customers300+

Fortune / Organizations50+ / 500+

Large installations in production (OEM)5,000+

ISVs25+InsightEdge is an in-memory real-

time analytics platform for instant insights to action; analyzing data

as it's born, enriching it with historical context, for smarter,

faster decisions

In-Memory Computing Platform for microsecond

scale transactional processing, data scalability, and powerful event-driven

workflows

Page 4: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Why

* Intro pictures from Wikipedia

Page 5: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Dinosaurs

Page 6: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Dinosaurs

Page 7: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Dinosaurs

Page 8: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

We’ve looked up to the stars

Page 9: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Not without first passing through the clouds

Page 10: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

It’s the smallest of opponents that are gamechangers

Page 11: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

We needed to find a way to ship man there…

The first flight of an airplane, the Wright Flyer on December 17, 1903

Page 12: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

How do we become cloud native?

• Manage Large Deployments• Cloud-ready, ZooKeeper based for large-scale and federated deployments

• REST API Management• Standards-based, utilizing

• Containerization and Orchestration• Docker, Kubernetes, OpenShift etc.

• Application-driven Deployment• Serverless-like user experience

• Pluggable Elastic Resource Balancing • Scheduling for dynamic re-partitioning and resource allocation

• Telemetry and Cluster Intelligence• Predictive maintenance / fault-tolerance over large-scale deployments

Page 13: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Who’s using K8s?

Page 14: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

• An overview of Kubernetes and the value it is bringing for automating deployment, scaling, and management of containerized applications

• How organizations can simplify management and container deployment on Cloud, Hybrid or On-premises environments with GigaSpaces InsightEdge

• 3 top open-source tools for production: HELM, Istio, and Prometheus

• A Kubernetes services comparison between cloud providers: AWS vs. Azure vs. GCP

OVERVIEW

Page 15: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

How Can You Gain the Most Value from Your Data?

REAL-TIME SECONDS MINUTES HOURS DAYS MONTHS

Actionable

Reactive Historical

Time-critical decision

Traditional “batch” business

intelligence

Preventive/Predictive Actionable Reactive Historical

Time

Valu

e

Near real-time data is highly valuable if you act on it on time

Historical + near real-time datais more valuable if you have the means to combine them

Page 16: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

InsightEdge: Real-time Analytics for Instant Insights To Action

VARIOUSDATA SOURCES

UNIFIED REAL-TIME ANALYTICS, AI & TRANSACTIONAL PROCESSING

REAL-TIME LAYER

DISTRIBUTED IN-MEMORY MULTI MODEL STORE

RAM

STORAGE-CLASS MEMORY

SSD STORAGE

HOTDATA

WARMDATA

APPLICATION

REAL-TIMEINSIGHTTO ACTION

DASHBOARDS

• No ETL, reduced complexity

• Built-in integration with external Hadoop/Data Lakes S3-like

• Fast access to historical data

• Automatedlife-cycle management

DEPLOY ANYWHERECLOUD/ON-PREMISE

BATCH LAYER

COLDDATA

Page 17: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Kubernetes

At least 54% of the Fortune 500 were hiring for Kubernetes skills in 2017

Around 51% growth for Kubernetes share in the market in 2018

Page 18: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

• #1 discussed project on GitHub

• Top 2 in number of contributors• ~400K users on Slack

Kubernetes is the Winner

Page 19: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

• The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project

• All cloud vendors have a managed Kubernetes service (EKS, AKS and GKE)

• Apache Spark 2.3 has native Kubernetes support

Business Landscape

Page 20: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Why Kubernetes?Desired State Scheduler

Cooperative Multi-Tenancy

Service Account Authentication

RBAC Authorization

HA ArchitectureKey building blocks for a “cloud like” platform as a service

• Auto deployment of data services, functions and frameworks (Spark ML, SQL, Zeppelin, etc.)

• Orchestration automation with cloud native solutions (auto scale, self healing)

Page 21: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Kubernetes – Management POD

MANAGEMENT POD

GSALOOKUP SERVICE

APACHE ZOOKEEPER

REST MANAGER

• Lookup Service (LUS) - The Lookup Service provides a mechanism for services to discover each other. For example, querying the LUS to find active GSCs.

• Apache ZooKeeper - Zookeeper is a centralized service used for space leader election

• REST Manager - RESTful API for managing the environment remotely from any platform

NODE

Page 22: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Kubernetes – Data POD

GSA

DATA POD

DATA GRID INSTANCE #1

• Data Grid Instance - This is the fundamental unit of deployment in the data grid. A Processing Unit instance is the actual runtime entity.

• Each Data POD contains a single instance to provide cloud native support using Kubernetes built-in controllers (auto scale, self healing)

NODE

DATA POD

DATA GRID INSTANCE #N

.....

Page 23: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Kubernetes – Spark POD

GSA

DRIVER POD

SPARK DRIVER

• Driver Pod – The Spark driver is running within a POD. The driver creates executors, connects to them, and executes the applicative code.

• Executor Pod – When the application completes, the executors’ pods terminate and are cleaned up, but the master pod persists logs and remains in “completed” state

NODE A

EXECUTOR POD

SPARK EXECUTOR

EXECUTOR POD

SPARK EXECUTOR

NODE B

EXECUTOR POD

SPARK EXECUTOR

EXECUTOR POD

SPARK EXECUTOR

CLIENT

spark-submit

Page 24: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

XAP High Level Overview 3,1 CLIENT CLIENT CLIENT

REST SELECT

NODE 1

DATA POD

C’

DATA POD

A

MANAGEMENT POD#1

NODE 2

DATA POD

A’

DATA POD

B

MANAGEMENT POD#2

NODE 3

DATA POD

B’

DATA POD

C

MANAGEMENT POD#3

Page 25: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

InsightEdge High Level Overview 3,1 CLIENT CLIENT CLIENT

spark-submit SELECT

NODE 1

DATA POD

C’

DATA POD

A

MANAGEMENT POD#1

SPARK EXECUTOR

POD

NODE 2

DATA POD

A’

DATA POD

B

MANAGEMENT POD#2

ZEPPELINPOD

SPARK EXECUTOR

POD

NODE 3

DATA POD

B’

DATA POD

C

MANAGEMENT POD#3

SPARK EXECUTOR

POD

SPARK DRIVER

POD

Page 26: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Kubernetes Dashboard View

Page 27: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

• Apply a POD Anti-Affinity using label selectors for both Data and Management PODs

• For example: spread the primary and backup data pods from this service across zones

• Each POD has a persistent identifier that is maintained across any rescheduling using StatefulSets

• For example: automated rolling updates/scale up data pod one-by-one

“Under the Hood” Guidelines

Page 28: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

• HELM – The package manager for Kubernetes

• Helm Charts helps you define, install and upgrade both XAP and InsightEdge

Installation

# helm install gigaspaces/insightedge --version=14.0 --name demo

Page 29: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

• The following Helm deploys a cluster with 3 partitions with 512MiB allocated for each partition:

Installation – Define Capacity

# helm install gigaspaces/insightedge --version=14.0 --name demo --set pu.partitions=3 ,pu.resources.limits.memory=512Mi

Page 30: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

• The following Helm command deploys a cluster in a high availability topology, with anti-affinity enabled:

Installation – Define High Availability

# helm install gigaspaces/insightedge --version=14.0 --name demo --set pu.ha=true,pu.antiAffinity.enabled=true

Page 31: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

• Use liveness probes to notify Kubernetes that your application’s processes are unhealthy and it should restart them

• The probe calls a bash script

Testing for Liveness

livenessProbe:exec:

command:- sh- -c - “data-pod-liveness 3181"

initialDelaySeconds: 15timeoutSeconds: 5

Page 32: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

• Use readiness probes to notify Kubernetes that your application’s processes are able to process input, for example: when data is loading the pod not yet ready.

• The probe calls a bash script

Testing for Readiness

readienssProbe:exec:

command:- sh- -c - “data-pod-ready 2251"

initialDelaySeconds: 15timeoutSeconds: 5

Page 33: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Lang

WAN Gateway – Real-time IMDG Data Replication

WAN GatewayWAN GatewayWAN Gateway

API

Any Cloud

Page 34: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

WAN Gateway

NODE 1

DATA POD

C’

DATA POD

A

MANAGEMENT

POD

NODE 2

DATA POD

A’

DATA POD

B

MANAGEMENT

POD

WEB UI POD

NODE 3

DATA POD

B’

DATA POD

C

MANAGEMENT

POD3

DATA POD

D

DATA POD

D’

NODE 1

DATA POD

C’

DATA POD

A

MANAGEMENT

POD

NODE 2

DATA POD

A’

DATA POD

B

MANAGEMENT

POD

WEB UI POD

NODE 3

DATA POD

B’

DATA POD

C

MANAGEMENT

POD

DATA POD

D

DATA POD

D’

CLUSTER A CLUSTER B

WAN GW POD

PUBLIC IP

DELEGATOR

SINK

WAN GATEWAY

POD

WAN GW POD

Page 35: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

New York London

Gateway Service

Backup Partition 1

Primary Partition 1

Backup Partition 2

Primary Partition 2

LondonDelegator

Sink

GatewayProxy

Hong Kong

Gateway Service

New YorkDelegator

Sink

GatewayProxy

Hong Kong

Backup Partition 1

Primary Partition 1

Backup Partition 2

Primary Partition 2

Hong Kong

SiteDB

Asynchronous persistency

SiteDB

Asynchronous persistency

1

1. Updates in New York cluster are pushed to local Delegator2. Delegator sends the updates to the list of target sites configured in New York Gateway3. London Sink will write the data to London Cluster4. Any conflicts that occur are resolved using the custom Conflict Resolution algorithm

2

3

4

Replication Flow

Page 36: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Auto Pod Failover

NODE 1

DATA POD

B’

DATA POD

A

SPARK EXECUTOR

POD

MANAGEMENT POD

NODE 2

DATA POD

B

DATA POD

A’

WEB UI POD

SPARK EXECUTOR

POD

SPARK DRIVER

POD

Page 37: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Auto Pod Failover

NODE 1

DATA POD

B’

DATA POD

A

SPARK EXECUTOR

POD

MANAGEMENT POD

NODE 2

DATA POD

B

DATA POD

A’

WEB UI POD

SPARK EXECUTOR

POD

Data Pod B Fails1

SPARK DRIVER

POD

Page 38: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Auto Pod Failover

NODE 1

DATA POD

B’

DATA POD

A

SPARK EXECUTOR

POD

MANAGEMENT POD

NODE 2

DATA POD

B

DATA POD

A’

WEB UI POD

SPARK EXECUTOR

POD

Data Pod B Fails

Failover to Data Pod B’2

1

SPARK DRIVER

POD

Page 39: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Auto Pod Failover

NODE 1

DATA POD

B’

DATA POD

A

SPARK EXECUTOR

POD

MANAGEMENT POD

NODE 2

DATA POD

B

DATA POD

A’

WEB UI POD

SPARK EXECUTOR

POD

SPARK DRIVER

POD

Data Pod B Fails

Failover to Data Pod B’

Data B is back up

2

1

3

Page 40: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Auto Pod Failback

NODE 1

DATA POD

B’

DATA POD

A

MANAGEMENT POD

SPARK DRIVER

POD

SPARK EXECUTOR

POD

NODE 2

DATA POD

B

DATA POD

A’

WEB UI POD

SPARK EXECUTOR

POD

Data Pod B Fails

Failover to Data Pod B’

Detect failure and restart Pod B

Once ready failback to Pod B as “proffered primary”

1

2

3

4

Page 41: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Automated Rolling Scale Up

NODE 1

DATA POD

B’

DATA POD

A

MANAGEMENT POD

SPARKDRIVER

POD

SPARK EXECUTOR

POD

NODE 2

DATA POD

A’

DATA POD

B

WEB UI POD

SPARK EXECUTOR

POD

Take Down Pod A’

Restart Pod A’ with X2 RAM

Fail over to Pod A’ and restart Pod A with X2 RAM

Fail back to Pod A

1

2

3

4

Repeat for each Pod

Page 42: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Kubernetes ComparisonFeature/Service

GCP Azure AWS IBM

Automatic Update

Auto or On-demand

On-demand On-demand On-Demand

Auto-scaling nodes

YesNo, available thorough k8s autoscale

Yes No

Node Pools Yes No Yes No

Multiple Zones Yes No Yes Yes

RBAC Yes Yes Yes Yes

Bare Metal Nodes

No No Yes Yes

Page 43: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

3 Key Technologies for Kubernetes

• Istio - Service MeshIstio manages and routes encrypted network traffic, balances loads across microservices, enforces access policies, verifies service identity and provides tracing, aggregates service to service telemetry.

• Prometheus – MonitoringMonitor applications and infrastructure running in Kubernetes, supports service discovery, built-in alerts, and more.

• Helm - Package Manager for Continuous Deployments

Repeatable deployments without all of the overhead and complication of keeping dependencies up to date and consistent

Page 44: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

RECORDED DEMOLINK: https://www.youtube.com/watch?v=i4Z4__l8N9Q

Page 45: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Fetch InsightEdge Helm Chart

Page 46: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Installing a Data Grid

Page 47: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Monitoring

Page 48: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Running a Spark job

Run the following InsightEdge submit script for the SparkPi example. It calculates a Pi approximation. The result of the calculation is printed to the log.

(Go to the driver pod and see the Pi value that was calculated, e.g. “Pi is roughly 3.1391756458782296”)

Page 49: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Running an InsightEdge Spark Job

Run the following InsightEdge submit script for the SaveRDD example, which generates 100,000 Products, converts them to RDD, and saves them to the data grid.

Page 50: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Apache Zeppelin

Zeppelin URL: http://192.168.99.100:30990

Page 51: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

SQL Queries

Page 52: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

SQL Queries

Page 53: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Failover

Page 54: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Failover

Page 55: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have
Page 56: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

To make a long story short, we’ve built spaceships

Page 57: Director, Technology Innovation … · • The leading orchestration tool vs. Docker Swarm, Mesos, OpenShift and Cloud Foundry and most used CNCF project • All cloud vendors have

Tal Doron

Director, Technology Innovation

THANK YOU

@taldoron

taldoron84

[email protected]