Ssdb: Difference between revisions
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
One more thing worth mentioning is that the Zoom Zimlet makes use of SSDB and does not work without it. | One more thing worth mentioning is that the Zoom Zimlet makes use of SSDB and does not work without it. | ||
'''SSDB does not have encryption or authentication support, this means you have to protect access to it at the network level!''' | |||
= Installing SSDB = | = Installing SSDB = |
Latest revision as of 14:37, 30 January 2023
SSDB
Zimbra traditionally stores Authentication Tokens, CSRF Tokens and log-on timestamps in the LDAP. On Zimbra systems with a large number of active users, this will increase the load on the LDAP server, which can cause LDAP responses to slow down.
Zimbra supports storing short-lived data (aka ephemeral data) in a separate SSDB database server. SSDB is a high-performance key-value(key-string, key-set, key-hashmap) NoSQL database; an alternative to Redis. SSDB is more suitable for this short-lived type of data.
In this article, you will learn how to install SSDB and how to configure Zimbra to use SSDB on a single server Zimbra installation. For more information on setting up SSDB in a cluster see the Zimbra Admin guide.
One more thing worth mentioning is that the Zoom Zimlet makes use of SSDB and does not work without it.
SSDB does not have encryption or authentication support, this means you have to protect access to it at the network level!
Installing SSDB
First, install build tools.
On Ubuntu:
apt install build-essential autoconf
On RedHat:
yum groupinstall "Development Tools"
Then download, compile and install SSDB from source as root:
cd /root/ wget https://github.com/ideawu/ssdb/archive/master.zip unzip master cd ssdb-master make sudo make install
The make install
command will install SSDB to /usr/local/ssdb
.
SSDB works best by using Init scripts this way you can start SSDB on boot.
On Ubuntu:
cp /root/ssdb-master/tools/ssdb.sh /etc/init.d/
On RedHat:
cp /root/ssdb-master/tools/ssdb.sh /etc/init.d/ssdb
Open the ssdb file in the init.d folder and change the line:
configs="/data/ssdb_data/test/ssdb.conf"
to:
configs="/usr/local/ssdb/ssdb.conf"
Finally enable and start SSDB:
On RedHat:
chkconfig --add ssdb chkconfig ssdb on
On Ubuntu:
chmod a+x /etc/init.d/ssdb.sh update-rc.d ssdb.sh defaults
Test if the init script works by rebooting the server (the whole operating system), after the boot completes check if SSDB runs by checking if it listens:
#netstat command is in net-tools, to install net-tools: # yum/apt install net-tools netstat -tulpn | grep 8888 #expected output: tcp 0 0 127.0.0.1:8888 0.0.0.0:* LISTEN 619/ssdb-server
SSDB logs into syslog, you can cat /var/log/syslog | grep ssdb
to find error messages.
Configuring Zimbra to use SSDB
su - zimbra /opt/zimbra/bin/zmmigrateattrs ssdb:127.0.0.1:8888 zmprov mcf zimbraEphemeralBackendURL ssdb:127.0.0.1:8888
Invalidate all user sessions
Depending on your environment running this command will take some time, there will not be a progress indication. This has been tested on a large multi-server environment. Use the cd command to change into the SSDB installation directory:
cd /opt/ssdb/ #used often cd /usr/local/ssdb/ #used in this guide ./ssdb-cli -h 127.0.0.1 -p 8888 flushdb
SSDB replication may be affected, so it is best to first break replication and run this command on a single master of SSDB and then resume SSDB replication.