microservices-demo
microservices-demo copied to clipboard
PersistentVolume with external storage support for in-cluster databases
Today, the in-cluster redis
database is a Deployment
, as a best practice for such in-cluster scenario it would be great to have it as StatefulSet
with a PersistentVolume
. Maybe with Filestore like illustrated here? Or maybe another storage? That will also illustrate yet another great story with multiple Google Cloud services while showing best practices. This will allow Online Boutique's users (Googlers, etc.) to have a ready to use solution for such stateful workloads scenarios.
We maybe don't want to have this as default, and we may want to keep this as Deployment
by default (?), but maybe to start with a new Online Boutique variation (i.e. Kustomize overlay) would be a great candidate?
Tagging @bourgeoisor @ahrarmonsur @charlieyu1996 as I'm sure they could provide more insights around this and maybe planning this for 2023?
This is a great idea, and a good point of collaboration for myself and the GKE DPEs.
My initial thoughts:
- Should
Redis
be used here or should we use another database (e.g., MySQL or PostgreSQL) that's more commonly tied to StatefulSets? More specifically, how common is it to tie a StatefulSet to Redis? - Yes, as @mathieu-benoit suggested, I don't think StatefulSets should be used by Online Boutique's default deployment. To ensure Online Boutique is easier to use in demos/tutorials, let's keep it as stateless as possible (by default). For instance, this makes multi-cluster demos easier.
- I image we would just be introducing a new Kustomize Component inside /kustomize/components that contains a StatefulSet and related resources (similar to Bank of Anthos).
- I've assigned a low priority (P3) to this for now.
Linking the analogue for Bank of Anthos: https://github.com/GoogleCloudPlatform/bank-of-anthos/issues/1068
Commenting since this is near out-of-SLO:
- Leaving this open since this would be a nice-to-have.
- But not a team priority today — keeping at
p3
.
Can I take this up?