launch/scale a containerized app on http request

4/22/2020

Sorry if my subject was already handled elsewhere but I don't see where to start the search. I have an app separated in 3 containers : front (Angular) / back (Node.js) / mysql. This is a demo that will be available on a website. The app will be provided by another server and I want to launch the app in a separated window with an http request from my website (button). As the user will test his own data (video file and management of fictive users), I want to erase all after he leaves. Question 1: is it possible to launch the set of containers on a http request (and how to?) Question 2: How to erase the datas? (destroying the container by a timeout?) Question 3: Is launching a set of containers for each user a good solution to handle several users at the same time? I looked at Kubernetes but didn't find metric to scale up on http request. Moreover, how to redirect each user on his set of containers?

-- Erwan DELVAT
docker
kubernetes

1 Answer

4/22/2020
  1. lunching on http request - not on kubernetes. you ususally deploy there with kubectl command. and it takes few min to start all the pods you need and services to be accesable.
  2. Destroy pod (running container in kubernetes called pod) is usually kubectl.... command as well.
  3. creating pod per user is not what kubernetes designed for sure.

    Kubernetes has autoscaling on load, but it is based on load balancer, and all pods in autoscaler should be able to do any request. So kubernetes is more like constantly monitoring automatic DevOps guy which also autoscale if necessary (most often cpu usage, but not limited by cpu)

-- user2932688
Source: StackOverflow