Enable Gateway Spec.Listener
sharding
#1246
Replies: 3 comments 5 replies
-
https://github.com/knative-sandbox/gateway-api is 404 :( |
Beta Was this translation helpful? Give feedback.
-
We've left room for this in the spec, but I'm not sure any implementations have decided to merge Gateways yet: gateway-api/apis/v1beta1/gateway_types.go Lines 76 to 78 in 541e9fc At a high level, it seems like it would be difficult/impossible to require implementations to support this kind of concept because some have very real limits in terms of the underlying layers they are translating this API to. |
Beta Was this translation helpful? Give feedback.
-
I've created a GEP issue to help address this - #1713 |
Beta Was this translation helpful? Give feedback.
-
As part of my quest to implement Gateway API for Knative, I've been looking at how to enable TLS support for potentially 10k Knative Services in a single cluster. As a reminder, we're looking for the following properties, which seem reasonable:
*.example.com
DNS entry pointing to a single pool of proxiesListener
in a shared namespace and Service namespace-scoped TLSSecret
s, aReferenceGrant
andHTTPRoute
allowing that namesppace-specific hostname to be used only by the namespace in question1.Support a second Gateway of the same
gatewayClass
, which is only exposed forsevice.namespace.svc
-scoped names, and is not available off-clusterThe current design of a
Spec.Listener
list on the Gateway resource probably limits this for a single gateway to around 1-2k Knative Services -- I'm guessing that theListener
component is around 300 bytes, and themanagedFields
tracking probably adds another 250 bytes or so. With a 1MB limit on etcd entities for storage, this means 1M / 450 ~= 2.2k Listeners, assuming no other usage or status information that grows with the number of entities.Additionally, it was pointed out during code-review that this
Gateway
object may become an apiserver hot-spot for updates, either requiring careful queueing on the controller side, or introducing a lot of "concurrent modification" errors.Talking with @youngnick, he suggested that an implementation could choose to coalesce multiple Gateways to serve off a single IP address, but the current Contour implementation does not do this. Doing this would enable creating a separate Gateway for each Knative Service, which would also make cleanup during object deletion and updates easier.
Furthermore, taking point 4 into account, you would need some way to ensure that the external TLS Gateway entries provisioned in 3 were associated with the Gateway address from 2, not the Gateway address from 4.
Beta Was this translation helpful? Give feedback.
All reactions