Reputation: 41
I am building a containerized web application that has a ReactJS frontend container and a REST Api backend container. For development, I've been hosting each one in a separate VM at Google Compute Engine. We're looking to move them into Kubernetes and are unsure on what would be the best architecture given that we would like more compute power and parallel nodes for the backend api than the front end service.
I'd like to know which of these options is the best for our needs:
I could not find anything online as for best practices as all documentation I found only mentiones single cluster / node pools.
Thanks!
Upvotes: 1
Views: 1298
Reputation: 128995
At least, you should not need to manage two different clusters only for the described use case.
I would not recommend to use specific nodes for frontend, use your cluster. If you really see a bottleneck you can adapt to the situation. But your containers should use different resource requests and limits.
A think to think about for frontend: the user request a page and that page may refer to other frontend resources, e.g. bundled resources with specific url? - that may change when you deploy a new version. To mitigate this, you might want to use a cache or CDN in front of your cluster for front-end resources - depending on how much you care for availability. You may also consider to use Buckets instead of containers for static resources, in a cloud environment.
Upvotes: 0