Some K8s Questions #484
Replies: 4 comments
-
|
Hi, Cache (emptyDir):
Gateway topology:
Compactor:
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the quick response. My concern with the two seperate StatefulSet's was mainly that there is no coordination between them for changes that might affect both when used with a GitOps solution like Fleet or Flux (eg updating the image version). We use Fleet in our case, so I have the gateway running as a two replica StatefulSet but with two different configurations named based on the seperate pod names and those are referenced via an environment variable in the pod spec:
template:
spec:
containers:
- name: zerofs
args: ["run", "-c", "/etc/zerofs/$(POD_NAME).toml", "--no-compactor"]
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.nameHaving said that as an example of deploying the Gateway the current manifest is probably easier to understand as you said, and simple enough to adapt for someone that wants to do this. Thanks again. |
Beta Was this translation helpful? Give feedback.
-
|
Another question I wasn’t sure about was relating to the WAL feature and if both gateways in the HA pair need access to the same WAL storage? The documentation says the WAL and HA are compatible but does this need to be the same storage or could it be a local PVC? If it needs to be the “same” storage could it be a ReadWriteMany PVC or is S3 the only option here? Finally if shared object storage is required for the WAL is there any advantage to configuring a WAL to the same S3 storage provider/tier as the standard storage used for ZeroFS or does it only help if WAL storage is faster/lower latency? Also if there is a better way to ask these sort of questions without cluttering up your GitHub Issues please let me know. |
Beta Was this translation helpful? Give feedback.
-
Yes, they do need to access the same storage. The WAL holds what hasn't yet been materialised into L0 SSTs. Essentially, it only exists to absorb fsync latency rather than creating an L0 per fsync.
This would work!
If your goal is more performance, local NVMe or something like S3 Express would work great. Otherwise, using the same bucket or a different bucket won't make any difference (assuming latency to both buckets is the same).
There's a github discussions tab on this repo. I just migrated this issue there as well. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have only just found that the CSI driver now exists for Kubernetes, which is amazing news, but I had some queries:
emptyDirvolume for cache storage?StatefulSet's however given the nature of this service would this make more sense as a singleStatefulSetwith two replicas?Deploymentbe best practice?For item 1 and 2 above, I am currently running things this way myself, so I am happy to submit a PR to change the examples if this is a good idea.
For the cache volume question I haven't actually tested this myself and wasn't sure if this could lead to data loss, with the main reason for asking if the gateway can be treated as "ephemeral" (but with a stable identity for each pod).
Beta Was this translation helpful? Give feedback.
All reactions