Closed av-uc closed 1 year ago
Of course if ejabberd is not caching data it is going to need to retrieve it from the DB more frequently, with a resulting increase in DB CPU and network utilization. Are you suggesting there should be no increase, that the increase is too large, or that the absolute CPU and network utilization is too high?
@nosnilmot Yes, there will be increase in network throughput, however the CPU increase is nearly 4 times of current value. I have a few questions regarding this,
Context: Multiple dedicated EC2s, each having a dedicated Ejabberd instance with its own cache, but they are not in a cluster together. Network is open between these servers & they can communicate with each other.
Questions
Apart from this, should Ejabberd servers be run in a cluster mode when running them as containers over Docker or AWS ECS ? Is there a way to make them stateless and run these containers independently - so as to get fault tolerance, scalability on an infra level ?
It would be great if you could answer these or at least point me to some doc that can help me with these questions.
Yes, there will be increase in network throughput, however the CPU increase is nearly 4 times of current value. I have a few questions regarding this,
If your users are mostly idle and the ejabberd traffic is dominated by new sessions, a 4-fold increase from disabling cache is not unexpected.
- Can routing still take place for user sessions ?
- 2 users, each on a different server - can they chat with each other ? will 2 processes within these 2 EC2s facilitate this ?
If all servers are configured as the same host(s), there will be no routing between them and users connected to different instances will not be able to chat. If the servers are configured with unique hosts then regular XMPP routing between domains will allow users of different servers to communicate (you may need the necessary s2s DNS SRV records in this case).
Apart from this, should Ejabberd servers be run in a cluster mode when running them as containers over Docker or AWS ECS ? Is there a way to make them stateless and run these containers independently - so as to get fault tolerance, scalability on an infra level ?
There is no one-size-fits-all correct configuration for an ejabberd deployment. Designing the architecture for your use-case is beyond the scope of this bug report, which does not appear to be a bug report anymore.
Thank you for the input, i'll move further discussion related to this to the discussion forum.
Before creating a ticket, please consider if this should fit the discussion forum better: https://github.com/processone/ejabberd/discussions
Environment
erl +V
Configuration (only if needed): grep -Ev '^$|^\s*#' ejabberd.yml
Errors from Monitoring
As traffic was increased on ejabberd instance, the network throughput and CPU utilisation of database increased.
Bug description
We have recently gone live with the above config and it seems using - use_cache: false has left to an increase in database cpu. Network throughput also seems to have been increased.