Hello!

Could somebody explain how the parameters publ_cache=2 and subs_db_mode depend on each other?
Do I understand correctly that only the following modes of subs_db_mode are allowed 0,1,2?

subs_db_mode:
0 - This disables database completely. Only memory will be used. Subscriptions will not survive restart. Use this value if you need a really fast presence module and subscription persistence is not necessary or is provided by other means.
1 - Write-Through scheme. Subscriptions are updated synchronously in database and in memory(used for read operations). Use this scheme if speed is not top priority, but it's important that no subscriptions will be lost during crash or reboot or if you have an external application that reads the state of the subscriptions from database and they need to be updated synchronously.
2 - Write-Back scheme. This is a combination of previous two schemes. All changes are made to memory and database synchronization is done in the timer. The timer deletes all expired contacts and flushes all modified or new subscriptions to database. Use this scheme if you encounter high-load peaks and want them to process as fast as possible. Latency of this mode is much lower than latency of mode 1, but slightly higher than latency of mode 0. To control the interval at which data is flushed to database, set the db_update_period parameter.
3 - DB-Only scheme. No memory cache is kept, all operations being directly performed with the database. The timer deletes all expired subscriptions from database. The mode is useful if you configure more servers sharing the same DB without any replication at SIP level. The mode may be slower due the high number of DB operation.

--

BR,
Denys Pozniak