21
Redis-Cluster Operator Makes Redis-Cluster deployment easier ! [email protected] © 2017 Amadeus IT Group and its affiliates and subsidiaries | @cedlamo

RedisConf17 - Amadeus - Redis-Cluster operator

Embed Size (px)

Citation preview

Page 1: RedisConf17 - Amadeus - Redis-Cluster operator

Redis-Cluster OperatorMakes Redis-Cluster deployment easier !

[email protected]

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

| @cedlamo

Page 2: RedisConf17 - Amadeus - Redis-Cluster operator

A global player at the heart of the travel industry

2

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Page 3: RedisConf17 - Amadeus - Redis-Cluster operator

Key business numbers

1.4 billionPassengers

boarded (PBs)

566 milliontravel agency

bookings processed

1.6+ billiondata requests

processed per day

5000+Application servers

~450 000queries per second(600 000 at peak)

3

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Page 4: RedisConf17 - Amadeus - Redis-Cluster operator

Our technology journey

SNATPFTN3720

1997

C++TCP/IP

JEE & SOAP

2000 2003 2006 2015 2017

Application on Open System in PRDIn House ESB

Industrializationof Open System

Launch ACS

TPF decoAlmost done

4

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Page 5: RedisConf17 - Amadeus - Redis-Cluster operator

ACS: Motivation and Goals

New Business Requirements:● improve responses time● hosted on client premises● data must stay in a country● hosting third party application

Current infrastructure:● bare metal or virtual machine● dedicated resources● limited elasticity● spare resources outside peak

time

5

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Amadeus Cloud Services: migration of our applications to a cloud based infrastructure: (OpenShift [private|public] infra)

Page 6: RedisConf17 - Amadeus - Redis-Cluster operator

Redis-Cluster with Openshift: Motivation and Goals

Improve resilience and performance of our applications

Offer a performant session offloading solution to our applications based on Redis

Redis-Cluster operated in Openshift

○ Same stack for middleware and application○ Simplify redis-cluster operational support○ Benefit from Amadeus Cloud Services: deployment,

monitoring, logging, etc 6

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Page 7: RedisConf17 - Amadeus - Redis-Cluster operator

Openshift / Kubernetes

Kubernetes7

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Page 8: RedisConf17 - Amadeus - Redis-Cluster operator

Redis in Kubernetes

8

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Page 9: RedisConf17 - Amadeus - Redis-Cluster operator

Several prototypes examples, but

Missing features:

● Simple deployment

● Update cluster topology: scaling, replication factor

● Rolling-update

● Resiliency

9

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Page 10: RedisConf17 - Amadeus - Redis-Cluster operator

MasterMaster

Redis-Cluster in Openshift

10

Master

Node

APIkubectlREST

Kubelet

Docker Daemon

Etcd

Scheduler

Node Kubelet

Docker Daemon

Node Kubelet

Docker Daemon

DNS

© 2

016

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Controller

Pod Pod Pod

Pod Pod PodPod Pod

PodPod Pod Pod

Pod Pod Pod Pod

Pod

Pod

Pod Redis-Master

Pod Redis-Slave

Pod Redis-Server

Page 11: RedisConf17 - Amadeus - Redis-Cluster operator

Redis Manager in Openshift

Pod: redis manager

app=manager

RC: manager

Manager

Watch

ConfigMap: ClusterConfiguration

NbMaster: 3ReplicationFactor: 2

Scale

Watch

redis-node -1-dsasxf

app=manager

Init Node

Service: redis-node

Deployment: redis-node

ReplicationSet: redis-node-1

redis-node -1-ascdsd

app=manager

Init Node

n

redis-node -1-etebfbd

app=manager

Init Node

Configure

11

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Page 12: RedisConf17 - Amadeus - Redis-Cluster operator

Redis-Cluster Rolling Update with Openshift

Pod: redis manager

RC: manager

Manager

Watch

ConfigMap: ClusterConfiguration

Deployment: redis-node

ReplicationSet: redis-node-1 ReplicationSet: redis-node-2

Service: redis-node

redis-node

V1

redis-node

V1

redis-node

V1

redis-node

V2

redis-node

V2

redis-node

V2

Scale

Migrate

Pod: Deployer

Redis-deployer

Update12

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Page 13: RedisConf17 - Amadeus - Redis-Cluster operator

Demo

Run in Openshift / Minishift

● Start a Redis-Cluster

● Scale up

● Rolling update

13

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Page 14: RedisConf17 - Amadeus - Redis-Cluster operator

Advantages of current solution

● Automate Redis-Cluster standard operations

○ Creation, Scaling, Rolling-update

● Don't requires persistent volumes

● Seen as yet another Kubernetes application

14

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Page 15: RedisConf17 - Amadeus - Redis-Cluster operator

Limitations of current solution

● One Redis-Cluster per Manager

● React to Kubernetes events (limited control)

● Depends on Openshift feature (custom deployer)

15

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Page 16: RedisConf17 - Amadeus - Redis-Cluster operator

How to improve current solution ?

OperatorRedis-

16

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Page 17: RedisConf17 - Amadeus - Redis-Cluster operator

Redis Operator

Pod: Redis Operator

RC: Controller

Operator

Watch

Service: redis-node

ThirdPartyResources: Redis-Cluster

Replicas: 3ReplicationFactor: 2PodTemplate: {}

Kubernetes Scheduler

Scheduling Requests

redis-node -1-dsasxf

app=manager

Init Node

Schedule Pods

redis-node -1-ascdsd

app=manager

Init Node

n

redis-node -1-etebfbd

app=manager

Init Nodeconfigure

17

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Page 18: RedisConf17 - Amadeus - Redis-Cluster operator

Advantages of Redis-Cluster Operator

● Specificity hidden in a new K8s Object (3rd party resource)

● Generic User Experience

● Responsive vs Proactive:

○ Better Redis-Node life cycle management

● One Operator for several Redis-Clusters

18

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Page 19: RedisConf17 - Amadeus - Redis-Cluster operator

What next?

● Opensource current Redis-Manager

● Migrate Redis-Manager logic in an Operator

● Package in Helm chart

● Integration with K8s Service Catalogue

19

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Page 20: RedisConf17 - Amadeus - Redis-Cluster operator

Key takeaways

● Easy deployment of Redis-Cluster thanks to Kubernetes

● Automation thanks to Redis-Manager/Operator

● Opensourced soon

20

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Page 21: RedisConf17 - Amadeus - Redis-Cluster operator

Questions?

21

© 2

017

Am

adeu

s IT

Gro

up a

nd it

s af

filia

tes

and

subs

idia

ries

Thank you !

[email protected] | @cedlamo