Closed rugamaga closed 2 years ago
Thanks for the feature request, @rugamaga. This is something we considered when writing the initial readiness check. So to briefly summarize, are you suggesting the Cloud SQL Proxy support a configurable readiness check? In other words, maybe we allow callers to specify how many instances can fail before the readiness check fails?
@enocom Yes. If you can specify how many instances can fail before the readiness check fails, it would be useful for making it robust.
How about something like:
—readiness-check-threshold=n
where n is the number of instances which can fail before the check fails?
That's nice. but in this context, I think we want to check minimum alived instances
.
so better option is --min-ready-instances=n
where n is ready instances. for example, when n = 2
, cloud-sql-proxy will respond ready
if over than two instances are alived.
OK, got it. I think that's a pretty simple fix. I'll pull this into my queue.
I decided to add support for a min-ready
query param instead of adding another CLI flag. See #1496 for details.