Add optional Cluster instance limit

Description

Right now we do not limit the number of Cluster instances created, but in order to avoid misuse we could add a feature a user configure. Something like:

  • On Cluster, keep a static counter of instances (decremented on shutdown)

  • By default there is no upper limit, but we could query it for debugging reasons (the counter)

  • Optionally allow to set a static limit and if it is reached prevent from creating new instances (i.e. in cluster#connect)

Maybe this can be put into Core instead so all SDKs could benefit from it, but for usability those static setters should still be exposed on the Cluster.

Related: is there something similar we should do for the environment?

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Fix versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created July 28, 2022 at 11:35 AM
Updated August 9, 2022 at 8:12 PM
Resolved August 9, 2022 at 3:27 PM
Instabug