introduce maxclients flag
DragonflyDB should be able to protect itself from opening too many connections on the primary port. Otherwise, it will risk reaching max number of open files.
Dragonfly can support a high number by default, I would say 64k is ok as a default for the flag. Redis sets it as 1000: https://github.com/redis/redis/blob/6bf9b144ef722fb301c065125a6bf6cd385841bf/src/config.c#L3188
Also, we should provide a friendly warning on startup if max files ulimit is lower than maxclients - see https://github.com/redis/redis/blob/6bf9b144ef722fb301c065125a6bf6cd385841bf/src/server.c#L2278 and
https://github.com/redis/redis/blob/6bf9b144ef722fb301c065125a6bf6cd385841bf/src/config.c#L2539 for example
@ashotland @Pothulapati I suggest tracking connection count metrics in our monitoring dashboards. Also, pls create a follow-up issue - we should configure dragonfly by setting this TBD flag according to the instance memory.
Connection count is already part of the dashboard.
Created controlplane issue.
@royjacobson Note: We will need to support setting this flag from config set command