Replies: 3 comments 2 replies
-
Now we get into the concerns of: possible vs complex. Which leads us down to: how easy is this to support, can we prove to the customer that the sharded options is truly optimizing something for them (these two options give a noticeable / provable different experience for their customers) We also have to recognize that K8s constantly rebalances pods and this design and the blog originally assumed long lived machines. Am I following the proposal... |
Beta Was this translation helpful? Give feedback.
-
@CVanF5 does it addresses manual cache purging issue (i.e. PURGE request goes to the pods where the cache was stored)? wouldn't the hash change if a pod goes down or a new one comes up? |
Beta Was this translation helpful? Give feedback.
-
"not a global shared cache, but behaves like one" There is still an unspoken need for pod volume persistence across pod restarts. StatefulSet for example. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The following is a design proposal that describes a way for F5 Kubernetes Ingress to implement the Shared Caches with NGINX Plus Cache Clusters architecture described in the link.
This approach:
Fundamentally the two-tier architecture relies on dual NGINX server directives that could be expressed in the following way
With this design a client connection can land on any Ingress replica on tier 1 (load balancing tier). NGINX will then use
consistent-hash
to select a server from tier 2 (cache tier) which can be itself or any other Ingress replica. Tier 2 has the desiredproxy_cache
settings and can respond with cache should it be available. The upstream for tier 2 is the origin service.There are 2 ways to visualise this architecture:
From a virtual perspective Tier 1 and 2 are separate hops.
From a Kubernetes user perspective tier 1 and 2 are the same ReplicaSet
It should noted that this design is not a "global shared cache" but more of a "distributed partitioned cache/sharded cache system" where each NGINX replica has its own local on disk cache that's warmed up individually over time via the consistent-hash algorithm.
The advantages of this solution:
This mode could be activated with a
mode: sharded
directive. For example:For implementation for the controller needs to generate the dual server directives and a Kubernetes service with
ClusterIP: None
for the cache tier when the cache mode is set tosharded
Any feedback is welcome!
Beta Was this translation helpful? Give feedback.
All reactions