How We Hooked Up Chat Between Two Backends
At PDP Mobile, we implemented two-way chat synchronization between our backend and external CRMs. Here’s how Redis-based polling, locking, and a fallback to the customer’s CRM database work under the hood.

At PDP Mobile, we built two-way chat synchronization between our backend and external CRMs. It sounds simple, but in practice it’s like coordinating two calendars for very busy people 😅
What’s under the hood:
— Redis-based polling: every 10 seconds we check CRM for new messages
— Redis locks: polling is handled by only one worker to avoid duplicates and race conditions
— 2 data sources: first we go through the external CRM API, and if it decides it’s “not really up for it today”, we use a fallback: direct reads from the customer’s CRM database
— when a WebSocket event arrives, we automatically update the RTK Query cache, and the user’s chat refreshes without any manual reloads
In an era where everyone talks about real-time UX and fault tolerance, this hybrid approach really helps: fast, reliable, and with no surprises in production.