SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
30/06/17
Copyright @ 2014 ParisJug. Licence CC - Creative Commons 2.0 France – Paternité - Pas
d'Utilisation Commerciale - Partage des Conditions Initiales à l'Identique
www.parisjug.org
Tomcat: from aTomcat: from a
cluster to the Cloudcluster to the Cloud
Tomcat: from aTomcat: from a
cluster to the Cloudcluster to the Cloud
par Jean-Frederic Clere
@jfclere
par Jean-Frederic Clere
@jfclere
30/06/17
30/06/17
AgendaAgenda
●
Who I am
● A cluster:
– Session replication and application.
● The cloud:
– Nope it doesn’t work from scratch.
– External session replication
● Via Infinispan and KubePing
– Modify the tomcat cluster (still not finished)
● AKA dynamic list of nodes
●
Only TCP. (8888 port exported via deployment.yml)
– Demos
● What next? Questions / Suggestions
● Who I am
● A cluster:
– Session replication and application.
● The cloud:
– Nope it doesn’t work from scratch.
– External session replication
● Via Infinispan and KubePing
– Modify the tomcat cluster (still not finished)
●
AKA dynamic list of nodes
● Only TCP. (8888 port exported via deployment.yml)
– Demos
● What next? Questions / Suggestions
30/06/17
Who am I?Who am I?
● Jean-Frederic Clere
● Red Hat
● Years writing JAVA code and server software
● Tomcat committer since 2001
● Doing OpenSource since 1999
● Cyclist/Runner etc
● Lived 15 years in Spain (Barcelona)
● Now in Neuchâtel (CH)
● Jean-Frederic Clere
● Red Hat
● Years writing JAVA code and server software
● Tomcat committer since 2001
● Doing OpenSource since 1999
● Cyclist/Runner etc
● Lived 15 years in Spain (Barcelona)
● Now in Neuchâtel (CH)
30/06/17
A clusterA cluster
INTERNET
INTRANET
Router/Prox
y
6
30/06/17
How to replicate sessionsHow to replicate sessions
● In cluster:
● <distributable/> in web.xml
● <Cluster
className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
● Port upd 45564
● Ports tcp range 4000:4100
● In cluster:
● <distributable/> in web.xml
● <Cluster
className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
● Port upd 45564
● Ports tcp range 4000:4100
7
30/06/17
Demo
HAT
ServerWIFI
HATWIFI
● Number Guest clusterized.● Number Guest clusterized.
HTTP mod_balancerTomcat Tomcat
FireFox / Chrome
OPENSHIFTOPENSHIFT
● A Red Hat project / product
● See OpenShift
https://www.openshift.com/
● Docker 1.4
● Kubernetes 1.12
● A Red Hat project / product
● See OpenShift
https://www.openshift.com/
● Docker 1.4
● Kubernetes 1.12
Tomcat in OpenShiftTomcat in OpenShift
Developping Tomcat App in OpenShiftDevelopping Tomcat App in OpenShift
RHEL RHEL
When a developer
creates a new
application OpenShift
start a new pod
Web Console
Eclipse IDE
Command Line
Master Node Node Node
RHEL
pod
AWS / CloudForms / OpenStack (IaaS) / RHEV (Virt) / Bare Metal
Getting startedGetting started
● minishift:
– Allow to demo on single box.
– Easy to setup
– Small demo
● Bare metal / VM:
– Use ansible to install
– 2 nodes + master minimal
● Tomcat webapp with sessions
– Counter demo.
● minishift:
– Allow to demo on single box.
– Easy to setup
– Small demo
● Bare metal / VM:
– Use ansible to install
– 2 nodes + master minimal
● Tomcat webapp with sessions
– Counter demo.
Session replication in a clusterSession replication in a cluster
● HTTP/1.1
– No transaction
– No persistent connection
● Web App:
– Using cookies to carry session ID
– Store information in the session:
● Shopping cart etc.
● Multi nodes and dynamic
– Route request to right node
– Replicate information
● HTTP/1.1
– No transaction
– No persistent connection
● Web App:
– Using cookies to carry session ID
– Store information in the session:
● Shopping cart etc.
● Multi nodes and dynamic
– Route request to right node
– Replicate information
From a cluster to the CloudFrom a cluster to the Cloud
RHEL RHEL
Broker Node Node Node
RHEL
! Power
COL 1 2 3 4 5 6 7 8 1 2 3 6 25 50 8012
100
10
Ether 10/100
Load balancer Tomcat node Tomcat nodeTomcat node
HTTP
D
Problems for a cluster to cloud...Problems for a cluster to cloud...
● Many ways to solve:
– Embed tomcat with SpringBoot
– Create a docker image
– Extend an existing docker image
– Fabric8
● Tomcat session replication:
– No multicast in the cloud.
– Need a “ping” to find the other nodes
(KubePing)
– Add view to the system account of the
project.
● Many ways to solve:
– Embed tomcat with SpringBoot
– Create a docker image
– Extend an existing docker image
– Fabric8
● Tomcat session replication:
– No multicast in the cloud.
– Need a “ping” to find the other nodes
(KubePing)
– Add view to the system account of the
project.
GoalsGoals
● Have something:
– Minimal modification of the tomcat configuration (server.xml)
– Reuse existing code
● Some code still missing:
– Some in Tomcat
– Documentation / tests.
● Some more stuff:
– We use ansible for the install.
– Some maven builds and shells.
● Have something:
– Minimal modification of the tomcat configuration (server.xml)
– Reuse existing code
● Some code still missing:
– Some in Tomcat
– Documentation / tests.
● Some more stuff:
– We use ansible for the install.
– Some maven builds and shells.
Ismaïl Senhaji, Guillaume P
ythoud
16
30/06/17
SolutionSolution
Tomcat built-in solution
Peer discovery through multicast
heartbeat messages
Does not work in a cloud environment
Sessi
on
Data
Sessi
on
Data
Sessi
on
Data
Sessi
on
Data
Sessi
on
Data
Sessi
on
Data
Multicast
Our solution
Peer discovery through
Kubernetes Downward API
Works in OpenShift
Kubernetes API
Ismaïl Senhaji, Guillaume P
ythoud
17
30/06/17
Kubernetes APIKubernetes API
Tools for managing a
Kubernetes cluster
Accessible from the pods
within the cluster
GET
/api/v1/namespaces/tomcat-in-
the-cloud/pods
➔ Return a JSON representation of all
the pods in the cluster
Tools for managing a
Kubernetes cluster
Accessible from the pods
within the cluster
GET
/api/v1/namespaces/tomcat-in-
the-cloud/pods
➔ Return a JSON representation of all
the pods in the cluster
Ismaïl Senhaji, Guillaume P
ythoud
18
30/06/17
ArchitectureArchitecture
DynamicMembershipService
RefreshThread
● Call memberProvider.getMembers()
● Filter out already known Member
● Inform listeners of
new/dead members
KubernetesMemberProvider
● init():
● Get URL, cert, ... from
environment variables
● Set startTime
● getMembers():
● Call api to get pods
● Filter active pods
● Compute aliveTime
MemberProvider
● init(Properties)
● getMembers(): List<Member>
Where are we?Where are we?
● Main sites:
– https://docs.openshift.com
– https://github.com/Project31
– https://github.com/iSma/tomcat-
in-the-cloud/
● Thanks:
– Université de Neuchâtel
– Kurt Stam
<kstam@redhat.com>
● Main sites:
– https://docs.openshift.com
– https://github.com/Project31
– https://github.com/iSma/tomcat-
in-the-cloud/
● Thanks:
– Université de Neuchâtel
– Kurt Stam
<kstam@redhat.com>
Questions ?
Suggestions?
30/06/17
Titre
Merci !
30/06/17
Titre
Sponsors

Weitere ähnliche Inhalte

Was ist angesagt?

6 Million Ways To Log In Docker - NYC Docker Meetup 12/17/2014
6 Million Ways To Log In Docker - NYC Docker Meetup 12/17/20146 Million Ways To Log In Docker - NYC Docker Meetup 12/17/2014
6 Million Ways To Log In Docker - NYC Docker Meetup 12/17/2014Christian Beedgen
 
Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...
Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...
Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...Matthew Ahrens
 
Pragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecturePragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecturePiotr Pelczar
 
Kubernetes networking-made-easy-with-open-v switch
Kubernetes networking-made-easy-with-open-v switchKubernetes networking-made-easy-with-open-v switch
Kubernetes networking-made-easy-with-open-v switchInfraEngineer
 
青云CoreOS虚拟机部署kubernetes
青云CoreOS虚拟机部署kubernetes 青云CoreOS虚拟机部署kubernetes
青云CoreOS虚拟机部署kubernetes Zhichao Liang
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptablesKernel TLV
 
How to Troubleshoot OpenStack Without Losing Sleep
How to Troubleshoot OpenStack Without Losing SleepHow to Troubleshoot OpenStack Without Losing Sleep
How to Troubleshoot OpenStack Without Losing SleepSadique Puthen
 
Deep dive in Docker Overlay Networks
Deep dive in Docker Overlay NetworksDeep dive in Docker Overlay Networks
Deep dive in Docker Overlay NetworksLaurent Bernaille
 
Troubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support EngineerTroubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support EngineerJeff Anderson
 
What is new in Go 1.8
What is new in Go 1.8What is new in Go 1.8
What is new in Go 1.8John Hua
 
Docker deploy
Docker deployDocker deploy
Docker deployEric Ahn
 
Understanding docker networking
Understanding docker networkingUnderstanding docker networking
Understanding docker networkingLorenzo Fontana
 
Docker at Digital Ocean
Docker at Digital OceanDocker at Digital Ocean
Docker at Digital OceanCloud 66
 
Apache httpd reverse proxy and Tomcat
Apache httpd reverse proxy and TomcatApache httpd reverse proxy and Tomcat
Apache httpd reverse proxy and TomcatJean-Frederic Clere
 
Start tracking your ruby infrastructure
Start tracking your ruby infrastructureStart tracking your ruby infrastructure
Start tracking your ruby infrastructureSergiy Kukunin
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境謝 宗穎
 
Install openstack
Install openstackInstall openstack
Install openstack어형 이
 
Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)Ontico
 

Was ist angesagt? (20)

6 Million Ways To Log In Docker - NYC Docker Meetup 12/17/2014
6 Million Ways To Log In Docker - NYC Docker Meetup 12/17/20146 Million Ways To Log In Docker - NYC Docker Meetup 12/17/2014
6 Million Ways To Log In Docker - NYC Docker Meetup 12/17/2014
 
Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...
Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...
Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...
 
Taming AEM deployments
Taming AEM deploymentsTaming AEM deployments
Taming AEM deployments
 
Pragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecturePragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecture
 
Kubernetes networking-made-easy-with-open-v switch
Kubernetes networking-made-easy-with-open-v switchKubernetes networking-made-easy-with-open-v switch
Kubernetes networking-made-easy-with-open-v switch
 
青云CoreOS虚拟机部署kubernetes
青云CoreOS虚拟机部署kubernetes 青云CoreOS虚拟机部署kubernetes
青云CoreOS虚拟机部署kubernetes
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
 
How to Troubleshoot OpenStack Without Losing Sleep
How to Troubleshoot OpenStack Without Losing SleepHow to Troubleshoot OpenStack Without Losing Sleep
How to Troubleshoot OpenStack Without Losing Sleep
 
Deep dive in Docker Overlay Networks
Deep dive in Docker Overlay NetworksDeep dive in Docker Overlay Networks
Deep dive in Docker Overlay Networks
 
Troubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support EngineerTroubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support Engineer
 
What is new in Go 1.8
What is new in Go 1.8What is new in Go 1.8
What is new in Go 1.8
 
Docker deploy
Docker deployDocker deploy
Docker deploy
 
Understanding docker networking
Understanding docker networkingUnderstanding docker networking
Understanding docker networking
 
Discovering OpenBSD on AWS
Discovering OpenBSD on AWSDiscovering OpenBSD on AWS
Discovering OpenBSD on AWS
 
Docker at Digital Ocean
Docker at Digital OceanDocker at Digital Ocean
Docker at Digital Ocean
 
Apache httpd reverse proxy and Tomcat
Apache httpd reverse proxy and TomcatApache httpd reverse proxy and Tomcat
Apache httpd reverse proxy and Tomcat
 
Start tracking your ruby infrastructure
Start tracking your ruby infrastructureStart tracking your ruby infrastructure
Start tracking your ruby infrastructure
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
 
Install openstack
Install openstackInstall openstack
Install openstack
 
Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)
 

Ähnlich wie Tomcat from a cluster to the cloud on RP3

Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012mumrah
 
Free GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOpsFree GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOpsWeaveworks
 
Managing and Scaling Puppet - PuppetConf 2014
Managing and Scaling Puppet - PuppetConf 2014Managing and Scaling Puppet - PuppetConf 2014
Managing and Scaling Puppet - PuppetConf 2014Miguel Zuniga
 
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xrkr10
 
Kubecon seattle 2018 workshop slides
Kubecon seattle 2018 workshop slidesKubecon seattle 2018 workshop slides
Kubecon seattle 2018 workshop slidesWeaveworks
 
High Performance TensorFlow in Production - Big Data Spain - Madrid - Nov 15 ...
High Performance TensorFlow in Production - Big Data Spain - Madrid - Nov 15 ...High Performance TensorFlow in Production - Big Data Spain - Madrid - Nov 15 ...
High Performance TensorFlow in Production - Big Data Spain - Madrid - Nov 15 ...Chris Fregly
 
Managing and Scaling Puppet - PuppetConf 2014
Managing and Scaling Puppet - PuppetConf 2014Managing and Scaling Puppet - PuppetConf 2014
Managing and Scaling Puppet - PuppetConf 2014Puppet
 
Cloud Native Use Cases / Case Studies - KubeCon 2019 San Diego - RECAP
Cloud Native Use Cases / Case Studies - KubeCon 2019 San Diego - RECAPCloud Native Use Cases / Case Studies - KubeCon 2019 San Diego - RECAP
Cloud Native Use Cases / Case Studies - KubeCon 2019 San Diego - RECAPKrishna-Kumar
 
Deploying PostgreSQL on Kubernetes
Deploying PostgreSQL on KubernetesDeploying PostgreSQL on Kubernetes
Deploying PostgreSQL on KubernetesJimmy Angelakos
 
Optimizing, Profiling, and Deploying TensorFlow AI Models with GPUs - San Fra...
Optimizing, Profiling, and Deploying TensorFlow AI Models with GPUs - San Fra...Optimizing, Profiling, and Deploying TensorFlow AI Models with GPUs - San Fra...
Optimizing, Profiling, and Deploying TensorFlow AI Models with GPUs - San Fra...Chris Fregly
 
Building Google's ML Engine from Scratch on AWS with GPUs, Kubernetes, Istio,...
Building Google's ML Engine from Scratch on AWS with GPUs, Kubernetes, Istio,...Building Google's ML Engine from Scratch on AWS with GPUs, Kubernetes, Istio,...
Building Google's ML Engine from Scratch on AWS with GPUs, Kubernetes, Istio,...Chris Fregly
 
KubeCon EU 2016: Using Traffic Control to Test Apps in Kubernetes
KubeCon EU 2016: Using Traffic Control to Test Apps in KubernetesKubeCon EU 2016: Using Traffic Control to Test Apps in Kubernetes
KubeCon EU 2016: Using Traffic Control to Test Apps in KubernetesKubeAcademy
 
Troubleshooting .net core on linux
Troubleshooting .net core on linuxTroubleshooting .net core on linux
Troubleshooting .net core on linuxPavel Klimiankou
 
WKSctl: Gitops Management of Kubernetes Clusters
WKSctl: Gitops Management of Kubernetes ClustersWKSctl: Gitops Management of Kubernetes Clusters
WKSctl: Gitops Management of Kubernetes ClustersWeaveworks
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetesWilliam Stewart
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingStanislav Osipov
 

Ähnlich wie Tomcat from a cluster to the cloud on RP3 (20)

Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012
 
Free GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOpsFree GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOps
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Netty training
Netty trainingNetty training
Netty training
 
reBuy on Kubernetes
reBuy on KubernetesreBuy on Kubernetes
reBuy on Kubernetes
 
Managing and Scaling Puppet - PuppetConf 2014
Managing and Scaling Puppet - PuppetConf 2014Managing and Scaling Puppet - PuppetConf 2014
Managing and Scaling Puppet - PuppetConf 2014
 
Netty training
Netty trainingNetty training
Netty training
 
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12x
 
Kubecon seattle 2018 workshop slides
Kubecon seattle 2018 workshop slidesKubecon seattle 2018 workshop slides
Kubecon seattle 2018 workshop slides
 
High Performance TensorFlow in Production - Big Data Spain - Madrid - Nov 15 ...
High Performance TensorFlow in Production - Big Data Spain - Madrid - Nov 15 ...High Performance TensorFlow in Production - Big Data Spain - Madrid - Nov 15 ...
High Performance TensorFlow in Production - Big Data Spain - Madrid - Nov 15 ...
 
Managing and Scaling Puppet - PuppetConf 2014
Managing and Scaling Puppet - PuppetConf 2014Managing and Scaling Puppet - PuppetConf 2014
Managing and Scaling Puppet - PuppetConf 2014
 
Cloud Native Use Cases / Case Studies - KubeCon 2019 San Diego - RECAP
Cloud Native Use Cases / Case Studies - KubeCon 2019 San Diego - RECAPCloud Native Use Cases / Case Studies - KubeCon 2019 San Diego - RECAP
Cloud Native Use Cases / Case Studies - KubeCon 2019 San Diego - RECAP
 
Deploying PostgreSQL on Kubernetes
Deploying PostgreSQL on KubernetesDeploying PostgreSQL on Kubernetes
Deploying PostgreSQL on Kubernetes
 
Optimizing, Profiling, and Deploying TensorFlow AI Models with GPUs - San Fra...
Optimizing, Profiling, and Deploying TensorFlow AI Models with GPUs - San Fra...Optimizing, Profiling, and Deploying TensorFlow AI Models with GPUs - San Fra...
Optimizing, Profiling, and Deploying TensorFlow AI Models with GPUs - San Fra...
 
Building Google's ML Engine from Scratch on AWS with GPUs, Kubernetes, Istio,...
Building Google's ML Engine from Scratch on AWS with GPUs, Kubernetes, Istio,...Building Google's ML Engine from Scratch on AWS with GPUs, Kubernetes, Istio,...
Building Google's ML Engine from Scratch on AWS with GPUs, Kubernetes, Istio,...
 
KubeCon EU 2016: Using Traffic Control to Test Apps in Kubernetes
KubeCon EU 2016: Using Traffic Control to Test Apps in KubernetesKubeCon EU 2016: Using Traffic Control to Test Apps in Kubernetes
KubeCon EU 2016: Using Traffic Control to Test Apps in Kubernetes
 
Troubleshooting .net core on linux
Troubleshooting .net core on linuxTroubleshooting .net core on linux
Troubleshooting .net core on linux
 
WKSctl: Gitops Management of Kubernetes Clusters
WKSctl: Gitops Management of Kubernetes ClustersWKSctl: Gitops Management of Kubernetes Clusters
WKSctl: Gitops Management of Kubernetes Clusters
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scaling
 

Mehr von Jean-Frederic Clere

03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdfJean-Frederic Clere
 
03_clere_Proxing to tomcat with httpd.pdf
03_clere_Proxing to tomcat with httpd.pdf03_clere_Proxing to tomcat with httpd.pdf
03_clere_Proxing to tomcat with httpd.pdfJean-Frederic Clere
 
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...Jean-Frederic Clere
 
Apache httpd and TLS/SSL certificates validation
Apache httpd and TLS/SSL certificates validationApache httpd and TLS/SSL certificates validation
Apache httpd and TLS/SSL certificates validationJean-Frederic Clere
 
Having fun with Raspberry(s) and Apache projects
Having fun with Raspberry(s) and Apache projectsHaving fun with Raspberry(s) and Apache projects
Having fun with Raspberry(s) and Apache projectsJean-Frederic Clere
 
Having fun with Raspberry and Apache projects
Having fun with Raspberry and Apache projectsHaving fun with Raspberry and Apache projects
Having fun with Raspberry and Apache projectsJean-Frederic Clere
 
HTTP/2 and SSL/TLS state of art in ASF servers
HTTP/2 and SSL/TLS state of art in ASF serversHTTP/2 and SSL/TLS state of art in ASF servers
HTTP/2 and SSL/TLS state of art in ASF serversJean-Frederic Clere
 

Mehr von Jean-Frederic Clere (13)

Panama.pdf
Panama.pdfPanama.pdf
Panama.pdf
 
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
 
03_clere_Proxing to tomcat with httpd.pdf
03_clere_Proxing to tomcat with httpd.pdf03_clere_Proxing to tomcat with httpd.pdf
03_clere_Proxing to tomcat with httpd.pdf
 
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...
 
Apache httpd and TLS/SSL certificates validation
Apache httpd and TLS/SSL certificates validationApache httpd and TLS/SSL certificates validation
Apache httpd and TLS/SSL certificates validation
 
Having fun with Raspberry(s) and Apache projects
Having fun with Raspberry(s) and Apache projectsHaving fun with Raspberry(s) and Apache projects
Having fun with Raspberry(s) and Apache projects
 
Tomcat openssl
Tomcat opensslTomcat openssl
Tomcat openssl
 
Tomcat next
Tomcat nextTomcat next
Tomcat next
 
Having fun with Raspberry and Apache projects
Having fun with Raspberry and Apache projectsHaving fun with Raspberry and Apache projects
Having fun with Raspberry and Apache projects
 
HTTP/2 and SSL/TLS state of art in ASF servers
HTTP/2 and SSL/TLS state of art in ASF serversHTTP/2 and SSL/TLS state of art in ASF servers
HTTP/2 and SSL/TLS state of art in ASF servers
 
Tomcat next
Tomcat nextTomcat next
Tomcat next
 
Native 1.2.8
Native 1.2.8Native 1.2.8
Native 1.2.8
 
Tomcat openssl
Tomcat opensslTomcat openssl
Tomcat openssl
 

Kürzlich hochgeladen

定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationMarko4394
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleanscorenetworkseo
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 

Kürzlich hochgeladen (20)

定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentation
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleans
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 

Tomcat from a cluster to the cloud on RP3

  • 1. 30/06/17 Copyright @ 2014 ParisJug. Licence CC - Creative Commons 2.0 France – Paternité - Pas d'Utilisation Commerciale - Partage des Conditions Initiales à l'Identique www.parisjug.org
  • 2. Tomcat: from aTomcat: from a cluster to the Cloudcluster to the Cloud Tomcat: from aTomcat: from a cluster to the Cloudcluster to the Cloud par Jean-Frederic Clere @jfclere par Jean-Frederic Clere @jfclere 30/06/17
  • 3. 30/06/17 AgendaAgenda ● Who I am ● A cluster: – Session replication and application. ● The cloud: – Nope it doesn’t work from scratch. – External session replication ● Via Infinispan and KubePing – Modify the tomcat cluster (still not finished) ● AKA dynamic list of nodes ● Only TCP. (8888 port exported via deployment.yml) – Demos ● What next? Questions / Suggestions ● Who I am ● A cluster: – Session replication and application. ● The cloud: – Nope it doesn’t work from scratch. – External session replication ● Via Infinispan and KubePing – Modify the tomcat cluster (still not finished) ● AKA dynamic list of nodes ● Only TCP. (8888 port exported via deployment.yml) – Demos ● What next? Questions / Suggestions
  • 4. 30/06/17 Who am I?Who am I? ● Jean-Frederic Clere ● Red Hat ● Years writing JAVA code and server software ● Tomcat committer since 2001 ● Doing OpenSource since 1999 ● Cyclist/Runner etc ● Lived 15 years in Spain (Barcelona) ● Now in Neuchâtel (CH) ● Jean-Frederic Clere ● Red Hat ● Years writing JAVA code and server software ● Tomcat committer since 2001 ● Doing OpenSource since 1999 ● Cyclist/Runner etc ● Lived 15 years in Spain (Barcelona) ● Now in Neuchâtel (CH)
  • 6. 6 30/06/17 How to replicate sessionsHow to replicate sessions ● In cluster: ● <distributable/> in web.xml ● <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> ● Port upd 45564 ● Ports tcp range 4000:4100 ● In cluster: ● <distributable/> in web.xml ● <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> ● Port upd 45564 ● Ports tcp range 4000:4100
  • 7. 7 30/06/17 Demo HAT ServerWIFI HATWIFI ● Number Guest clusterized.● Number Guest clusterized. HTTP mod_balancerTomcat Tomcat FireFox / Chrome
  • 8. OPENSHIFTOPENSHIFT ● A Red Hat project / product ● See OpenShift https://www.openshift.com/ ● Docker 1.4 ● Kubernetes 1.12 ● A Red Hat project / product ● See OpenShift https://www.openshift.com/ ● Docker 1.4 ● Kubernetes 1.12
  • 10. Developping Tomcat App in OpenShiftDevelopping Tomcat App in OpenShift RHEL RHEL When a developer creates a new application OpenShift start a new pod Web Console Eclipse IDE Command Line Master Node Node Node RHEL pod AWS / CloudForms / OpenStack (IaaS) / RHEV (Virt) / Bare Metal
  • 11. Getting startedGetting started ● minishift: – Allow to demo on single box. – Easy to setup – Small demo ● Bare metal / VM: – Use ansible to install – 2 nodes + master minimal ● Tomcat webapp with sessions – Counter demo. ● minishift: – Allow to demo on single box. – Easy to setup – Small demo ● Bare metal / VM: – Use ansible to install – 2 nodes + master minimal ● Tomcat webapp with sessions – Counter demo.
  • 12. Session replication in a clusterSession replication in a cluster ● HTTP/1.1 – No transaction – No persistent connection ● Web App: – Using cookies to carry session ID – Store information in the session: ● Shopping cart etc. ● Multi nodes and dynamic – Route request to right node – Replicate information ● HTTP/1.1 – No transaction – No persistent connection ● Web App: – Using cookies to carry session ID – Store information in the session: ● Shopping cart etc. ● Multi nodes and dynamic – Route request to right node – Replicate information
  • 13. From a cluster to the CloudFrom a cluster to the Cloud RHEL RHEL Broker Node Node Node RHEL ! Power COL 1 2 3 4 5 6 7 8 1 2 3 6 25 50 8012 100 10 Ether 10/100 Load balancer Tomcat node Tomcat nodeTomcat node HTTP D
  • 14. Problems for a cluster to cloud...Problems for a cluster to cloud... ● Many ways to solve: – Embed tomcat with SpringBoot – Create a docker image – Extend an existing docker image – Fabric8 ● Tomcat session replication: – No multicast in the cloud. – Need a “ping” to find the other nodes (KubePing) – Add view to the system account of the project. ● Many ways to solve: – Embed tomcat with SpringBoot – Create a docker image – Extend an existing docker image – Fabric8 ● Tomcat session replication: – No multicast in the cloud. – Need a “ping” to find the other nodes (KubePing) – Add view to the system account of the project.
  • 15. GoalsGoals ● Have something: – Minimal modification of the tomcat configuration (server.xml) – Reuse existing code ● Some code still missing: – Some in Tomcat – Documentation / tests. ● Some more stuff: – We use ansible for the install. – Some maven builds and shells. ● Have something: – Minimal modification of the tomcat configuration (server.xml) – Reuse existing code ● Some code still missing: – Some in Tomcat – Documentation / tests. ● Some more stuff: – We use ansible for the install. – Some maven builds and shells.
  • 16. Ismaïl Senhaji, Guillaume P ythoud 16 30/06/17 SolutionSolution Tomcat built-in solution Peer discovery through multicast heartbeat messages Does not work in a cloud environment Sessi on Data Sessi on Data Sessi on Data Sessi on Data Sessi on Data Sessi on Data Multicast Our solution Peer discovery through Kubernetes Downward API Works in OpenShift Kubernetes API
  • 17. Ismaïl Senhaji, Guillaume P ythoud 17 30/06/17 Kubernetes APIKubernetes API Tools for managing a Kubernetes cluster Accessible from the pods within the cluster GET /api/v1/namespaces/tomcat-in- the-cloud/pods ➔ Return a JSON representation of all the pods in the cluster Tools for managing a Kubernetes cluster Accessible from the pods within the cluster GET /api/v1/namespaces/tomcat-in- the-cloud/pods ➔ Return a JSON representation of all the pods in the cluster
  • 18. Ismaïl Senhaji, Guillaume P ythoud 18 30/06/17 ArchitectureArchitecture DynamicMembershipService RefreshThread ● Call memberProvider.getMembers() ● Filter out already known Member ● Inform listeners of new/dead members KubernetesMemberProvider ● init(): ● Get URL, cert, ... from environment variables ● Set startTime ● getMembers(): ● Call api to get pods ● Filter active pods ● Compute aliveTime MemberProvider ● init(Properties) ● getMembers(): List<Member>
  • 19. Where are we?Where are we? ● Main sites: – https://docs.openshift.com – https://github.com/Project31 – https://github.com/iSma/tomcat- in-the-cloud/ ● Thanks: – Université de Neuchâtel – Kurt Stam <kstam@redhat.com> ● Main sites: – https://docs.openshift.com – https://github.com/Project31 – https://github.com/iSma/tomcat- in-the-cloud/ ● Thanks: – Université de Neuchâtel – Kurt Stam <kstam@redhat.com>