Real-Time Analytics Meets Kubernetes
Tal Doron Director, Technology Innovation
Real-Time Analytics Meets Kubernetes Tal Doron Director, - - PowerPoint PPT Presentation
Real-Time Analytics Meets Kubernetes Tal Doron Director, Technology Innovation ABOUT ME @taldor oron on taldor oron on84 tald ld@gigaspaces.com Ta Tal Doron Director, Technology Innovation About GigaSpaces 300+ Direct customers
Tal Doron Director, Technology Innovation
Ta Tal Doron
Director, Technology Innovation
@taldor
taldor
tald ld@gigaspaces.com
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 GigaSpaces
Direct customers
300+
Fortune / Organizations
50+ / 500+
Large installations in production (OEM)
5,000+
ISVs
25+
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
* Intro pictures from Wikipedia
Dinosaurs
Dinosaurs
Dinosaurs
We’ve looked up to the stars
Not without first passing through the clouds
It’s the smallest of opponents that are gamechangers
We needed to find a way to ship man there…
The first flight of an airplane, the Wright Flyer on December 17, 1903
How do we become cloud native?
Mana nage L Larg rge D Depl ployment nts
REST AP API M Management
eriza zation and Orch chest estration
cation-dri driven D n Depl ployment nt
ggable e Elast stic c Reso esource ce Balanci cing g
elem emet etry and Clust ster er In Intel elligen gence ce
scaling, and management of containerized applications
Hybrid or On-premises environments with GigaSpaces InsightEdge
How Can You Gain the Most Value from Your Data?
REAL-TIME SECONDS MINUTES HOURS DAYS MONTHS Actionab le Reactive Historical
Ti Time-cr critical cal de decision Tr Trad aditional al “ “bat atch ch” bu business in intellig igence
Preventive/ Predictive Actionable Reactive Historical
Time Value
Ne Near real-ti time data ta is highly valuable if you act on it on time His istorical
ar re real-ti time data ta is more
you have the means to combine them
InsightEdge: Real-time Analytics for Instant Insights To Action
VARIOUS DATA SOURCES UNIFIED REAL-TIME ANALYTICS, AI & TRANSACTIONAL PROCESSING REAL-TIME LAYER DISTRIBUTED IN-MEMORY MULTI MODEL STORE RAM STORAGE-CLASS MEMORY SSD STORAGE
HOT DATA WARM DATAAPPLICATION
REAL-TIME INSIGHT TO ACTION
DASHBOARDS
complexity
external Hadoop/Data Lakes S3-like
data
life-cycle management
DEPLOY ANYWHERE CLOUD/ON-PREMISEBATCH LAYER
COLD DATAAt leas ast 54% % of
une 500 00 we were re hirin iring for
Ku Kubernetes s skills i in 2 2017 Aroun round d 51% % growt rowth for
Ku Kubernetes s share i in t the ma market in 2018
Cloud Foundry and most used CNCF project
Desired State Scheduler Cooperative Multi-Tenancy Service Account Authentication RBAC Authorization HA Architecture
Ke Key bui buildi ding bl blocks s for a “cloud ud like” pl platform a m as a a s service
functions and frameworks (Spark ML, SQL, Zeppelin, etc.)
cloud native solutions (auto scale, self healing)
MANAGEMENT POD
GSA LOOKUP SERVICE APACHE ZOOKEEPER REST MANAGER
Service provides a mechanism for services to discover each other. For example, querying the LUS to find active GSCs.
centralized service used for space leader election
managing the environment remotely from any platform
NODE
GSA
DATA POD
DATA GRID INSTANCE #1
fundamental unit of deployment in the data grid. A Processing Unit instance is the actual runtime entity.
instance to provide cloud native support using Kubernetes built-in controllers (auto scale, self healing)
NODE DATA POD
DATA GRID INSTANCE #N
. . . . .
GSA
DRIVER POD
SPARK DRIVER
running within a POD. The driver creates executors, connects to them, and executes the applicative code.
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
CLIENTspark-submit
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
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 ZEPPELIN POD SPARK EXECUTOR POD
NODE 3
DATA POD B’ DATA POD C MANAGEMENT POD #3 SPARK EXECUTOR POD SPARK DRIVER POD
Management PODs
across zones
rescheduling using StatefulSets
“Under the Hood” Guidelines
and InsightEdge
Installation
# helm install gigaspaces/insightedge --version=14.0 --name demo
512MiB allocated for each partition:
Installation – Define Capacity
# helm install gigaspaces/insightedge --version=14.0 --name demo
availability topology, with anti-affinity enabled:
Installation – Define High Availability
# helm install gigaspaces/insightedge --version=14.0 --name demo
processes are unhealthy and it should restart them
Testing for Liveness
livenessProbe: exec: command:
initialDelaySeconds: 15 timeoutSeconds: 5
processes are able to process input, for example: when data is loading the pod not yet ready.
Testing for Readiness
readienssProbe: exec: command:
initialDelaySeconds: 15 timeoutSeconds: 5
Lang
WAN Gateway – Real-time IMDG Data Replication WAN Gateway WAN Gateway WAN Gateway
API
Any Cloud
NODE 1
DATA POD C’ DATA POD A
MANAGEMENT PODNODE 2
DATA POD A’ DATA POD B
MANAGEMENT PODWEB UI POD
NODE 3
DATA POD B’ DATA POD C
MANAGEMENT POD3DATA POD D DATA POD D’
NODE 1
DATA POD C’ DATA POD A
MANAGEMENT PODNODE 2
DATA POD A’ DATA POD B
MANAGEMENT PODWEB UI POD
NODE 3
DATA POD B’ DATA POD C
MANAGEMENT PODDATA POD D DATA POD D’
CLUSTER A CLUSTER B
WAN GW POD
PUBLIC IP
DELEGATOR SINK
WAN GATEWAY POD
WAN GW POD
New York London
Gateway Service
Backup Partition 1 Primary Partition 1 Backup Partition 2 Primary Partition 2 London
Delegator Sink
Gateway Proxy
Hong Kong
Gateway Service
New York
Delegator Sink
Gateway Proxy
Hong Kong Backup Partition 1 Primary Partition 1 Backup Partition 2 Primary Partition 2
Hong Kong
Site DB
Asynchronous persistency
Site DB
Asynchronous persistency
1
1. Updates in New York cluster are pushed to local Delegator 2. Delegator sends the updates to the list of target sites configured in New York Gateway 3. London Sink will write the data to London Cluster 4. Any conflicts that occur are resolved using the custom Conflict Resolution algorithm
2 3 4
Replication Flow
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
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
1
SPARK DRIVER POD
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
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
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
NODE 1
DATA POD B’ DATA POD A MANAGEMENT POD SPARK DRIVER 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
Feature/ Service GCP Azure AWS IBM Automatic Update Auto or On- demand On-demand On-demand On-Demand Auto-scaling nodes Yes No, 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
Istio - Se Service Mesh
Istio manages and routes encrypted network traffic, balances loads across microservices, enforces access policies, verifies service identity and provides tracing, aggregates service to service telemetry.
Prome metheus – Mo Monit itorin ring
Monitor applications and infrastructure running in Kubernetes, supports service discovery, built-in alerts, and more.
Helm - Pack ackag age Man anag ager for Co Conti tinuous De Deployments ts
Repeatable deployments without all of the overhead and complication of keeping dependencies up to date and consistent
LINK: https://www.youtube.com/watch?v=i4Z4__l8N9Q
Fetch InsightEdge Helm Chart
Installing a Data Grid
Monitoring
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”)
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.
Apache Zeppelin
Zeppelin URL: http://192.168.99.100:30990
SQL Queries
SQL Queries
Failover
Failover
To make a long story short, we’ve built spaceships
Ta Tal Doron
Director, Technology Innovation
@taldor
taldor
tald ld@gigaspaces.com