This is a demo of a contact center ACD application implemented with Redis. Multiple skills and multi-skilled agents are supported. Longest Available Agent (LAA) targeting is performed.
Contacts are implemented as Redis JSON objects. Each contact contains a JSON array of requisite skills.
Agents are implemented as Redis JSON objects. Each agent has meta data (first and last names) and a JSON array of their skills.
Availability queues for each skill are implemented as Redis Sorted Sets. The members of the set are available agents. Their associated scores are a timestamp (ms) signifying when they became available. This allows for LAA selection.
A universal queue is implemented as a Redis Sorted Set. The members of the set are the keys to the contacts and their associated scores are timestamps of their entry time to queue. This allows for multi-skill selection and FIFO handling.
- Available agents are placed into availability sorted sets per skill with a timestamp as their score.
- Contacts are placed into queue implemented as a sorted set with a timestamp as their score.
- Contacts are taken off of queue in a FIFO manner with BZPOPMIN
- Agents are targeted via ZINTER of the skill availability sets. The Agent with the lowest score (oldest timestamp) and possessing all the requisite skills for a contact gets selected.
HAProxy is used for load balancing all client connections.
Two HAProxy instances are deployed in a HA configuration via keepalived (VRRP). The VIP those instances share is 192.168.20.100.
- HTTP round-robin load balancing across 2 servers
- Dynamic scaling/Docker replica support via DNS and server-template
- HTTP least connection load balancing across 3 servers
- TLS back-to-back sessions. A self-signed certificate is generated by the start.sh script. That cert is used for the front-end. The default Redis-generated cert is used on the back-end.
- 'Sticky' sessions via server cookie
- TCP round-robin load balancing across 3 servers
- TLS pass-thru
- TCP round-robin load balancing across 3 servers
- Layer 7 health check via authenticated client connection w/Redis PING.
- Redis Enterprise - 3 nodes with 1 database of 2 shards
- Python REST API server (FastAPI) for proxying client operations into Redis
- Redis-py async client for all ACD operations
- Redis-py dispatcher application for monitoring the ACD queue and assigning agents to contacts
- Python simulator application for generating contacts into the ACD via REST API operations
- HAProxy Load Balancing of all Redis and HTTP connections
- VRRP redundancy of HAProxy instances via keepalived
- Docker
- Docker Compose
- openssl
- python3
git clone https://github.com/Redislabs-Solution-Architects/basic-acd.git && cd basic-acd
pip install -r requirements.txt
start.sh
cd ./src && python3 simulator.py
stop.sh