Running multiple instances of same springboot application

7/21/2019

I've a spring-boot application which i want to deploy on OVH public cloud.

I need t achieve the goal of deploying multiple instances of the same application, and each instance has to have its own resources (such as MySQL database).

Each instance has to be accessed with a special url. For example:

I'm really new to everything which concerns cloud computing and deployments.

From what i read on the internet, my doubt is to

  • Use Docker where each instance has to be running inside its own container (to have the resources separated for each instance)

  • Use Kubernetes to achieve the goal of having each instance accessable from a specific url.

Am i wrong ? any online courses / resources / videos which can help would be awsome.

Thanks in advance.

-- Mssm
docker
kubernetes
ovh
spring-boot
web-deployment

2 Answers

7/22/2019

Ideally, if it's a single application it should connect to one backend database, not 3 different databases.

If your use case is very specific and you really want to connect 3 instances of an application to 3 different databases then consider each deployed application as an independent application with 3 different deployments.

Talking about Docker and kubernenets, I don't feel you need these initially rather deploy your application directly to the cloud instances. To achieve the high availability of the application, deploy them as a part of autosacing group and map an ELB to each autoscaling group. Finally, map the ELB CNAME in your DNS record and start using your application.

Docker and K8s come with there own learning curve and adds overhead if you are new to this area. Though they have a lot of pros and are extremely beneficial if you have a lot of microservices to manage and have an agile environment.

My preference starts with VM first and then slowly move to the container world. :)

-- Vaibhav Jain
Source: StackOverflow

7/23/2019

Basically, Docker is a platform to develop, deploy, and run applications inside containers, therefore containers represent run-time environment for images. Kubernetes plays the role as an orchestrator and provides sufficient way for building communication channels between containers in the cluster and uses Docker by default as a container runtime.

There are some essential concepts in Kubernetes that describe a cluster core components and application workload, thus define a desired state of the cluster.

Kubernetes objects represent abstraction level of cluster management operations and containerized applications run-time environment within associated resources in Kubernetes API.

I would focus on the Kubernetes resources that are most crucial in application deployment lifecycle.

Deployment is the main mechanism which defines how are Pods should to be implemented within a cluster and provides specific configuration for further application run-time workflow.

Service describes a way how the particular Pod will communicate with other resources within a cluster, providing endpoint IP address and port where your application will respond.

Ingress exposes Kubernetes service outside the cluster with some exclusive benefits like load balancing, SSL/TLS ceritficate termination, etc.

You can get more relevant information about Kubernetes implementation in OVH within particular guide chapter.

-- mk_sta
Source: StackOverflow