Skip to main content

Identity Verification Queue: Scaling Throughput

Learn how to build a robust identity verification queue for high-throughput applications. We explore Redis, message queues, API rate limiting, and strategies for handling peak loads.

Identity Verification Queue: Scaling Throughput

Contents

In this guide

Jump to the part you need.

Identity Verification Queue: Scaling Throughput

In the world of online identity, providing a seamless and reliable verification experience is critical. As user bases grow and transaction volumes increase, identity verification systems must scale to handle the load. A well-designed identity verification queue is essential for achieving high-throughput and maintaining a positive user experience. This post dives into the technical aspects of building a scalable queue, focusing on technologies like Redis, message queues, and API rate limiting.

Key Takeaway 1: A robust queue prevents system overload during peak usage, ensuring consistent performance.

Key Takeaway 2: Redis provides a fast, in-memory data store ideal for managing queue state and rate limiting.

Key Takeaway 3: Message queues decouple components, improving resilience and enabling asynchronous processing.

Key Takeaway 4: Implementing effective API rate limiting is crucial to protect your backend infrastructure from abuse.

The Challenge: Handling Peak Loads

Identity verification processes can be resource-intensive. Each verification step – document upload, data extraction, fraud checks, biometric comparison – consumes processing power and network bandwidth. During peak times (e.g., new user sign-ups, promotional periods), the influx of verification requests can overwhelm the system, leading to slow response times, errors, and ultimately, user frustration. A naive approach of directly processing each request as it arrives will inevitably lead to bottlenecks.

Redis as a Central Queue Manager

Redis, an in-memory data structure store, is an excellent choice for managing the identity verification queue. Its speed and versatility make it ideal for several critical functions:

  • Queueing Requests: Redis lists can act as a queue, storing verification requests in a FIFO (First-In, First-Out) manner.
  • Rate Limiting: Redis counters can track the number of requests from a specific user or IP address within a given time window, enabling API rate limiting.
  • Job Status Tracking: Redis hashes can store the status of each verification job (e.g., pending, processing, completed, failed).
  • Distributed Locking: Redis locks can prevent race conditions when multiple worker processes are accessing shared resources.

For example, a simple Redis-based rate limiter might increment a counter for each user’s API key. If the counter exceeds a predefined threshold within a minute, subsequent requests are rejected. This prevents a single user from monopolizing system resources.

Leveraging Message Queues for Decoupling

While Redis is excellent for fast, in-memory operations, a message queue like RabbitMQ or Kafka provides further benefits by decoupling the request ingestion layer from the processing layer. Here's how it works:

  1. The API receives a verification request and publishes a message to the queue.
  2. Worker processes (consumers) subscribe to the queue and pick up messages.
  3. Each worker process performs the verification steps and updates the job status in Redis.

This decoupling offers several advantages:

  • Resilience: If a worker process fails, the message remains in the queue and can be processed by another worker.
  • Scalability: You can easily add more worker processes to handle increased load.
  • Asynchronous Processing: The API can return a response to the user immediately, while the verification process runs in the background.

Using a message queue allows for a more robust and scalable identity verification queue architecture. Didit leverages this decoupling extensively to process millions of verifications daily.

API Rate Limiting Strategies

API rate limiting is a critical component of any scalable system. It protects your backend infrastructure from abuse, prevents denial-of-service attacks, and ensures fair usage. Common rate limiting strategies include:

  • Token Bucket: A virtual bucket is filled with tokens at a fixed rate. Each request consumes a token. If the bucket is empty, the request is rejected.
  • Leaky Bucket: Similar to the token bucket, but requests are processed at a fixed rate, regardless of when they arrive.
  • Fixed Window: Allows a certain number of requests within a fixed time window (e.g., 100 requests per minute).
  • Sliding Window: A more sophisticated approach that considers the rate of requests over a sliding time window, providing more accurate rate limiting.

Redis is well-suited for implementing these strategies, providing fast access to counters and timestamps.

How Didit Helps

Didit provides a fully-managed identity platform with a built-in, high-throughput verification queue. We handle all the complexities of infrastructure management, scaling, and rate limiting, allowing you to focus on your core business. Our platform leverages Redis and message queues to ensure reliable and performant identity verification, even during peak loads. We provide:

  • Automatic Scaling: Our infrastructure scales automatically to meet demand.
  • Robust Rate Limiting: Built-in rate limiting protects your systems from abuse.
  • Real-time Monitoring: Monitor queue length, processing times, and error rates.
  • Detailed Analytics: Gain insights into your verification performance.

Ready to Get Started?

Don't let identity verification bottlenecks slow you down. Request a demo of the Didit platform today and see how we can help you scale your identity verification processes. You can also explore our pricing to find a plan that fits your needs.

Try it

Try this in the sandbox

Run the check this guide describes, free.

ID Verification

The product this post is about, taken from its topic. Run it free in the sandbox.

$0.15 per checkStart free

Author

Alberto Rosas

Co-founder and CEO

Alberto Rosas

Alberto Rosas

Co-founder and CEO

About Didit

Questions

Blog questions

Who writes the Didit blog?
The Didit team. Guides reviewed by Alberto Rosas, co-founder and CEO, carry his byline. The rest are published as Didit.
Which topics does the blog cover?
Eight topics: ID verification, business verification (KYB), AML, sanctions and compliance, fraud prevention, transaction monitoring and crypto, country guides, agents and developers, and product updates.
Is the blog available in my language?
Yes, in 15 languages: English, Spanish, French, German, Brazilian and European Portuguese, Catalan, Russian, Arabic, Chinese, Japanese, Hindi, Indonesian, Korean and Swahili. Not every post is translated, so each language shows the posts it has.
Where do I find product updates?
In the changelog at /changelog/ and under the Product updates topic.
Are these posts legal advice?
No. Regulation posts explain rules; your legal team decides how they apply.
How do I find posts on one topic?
Open one of the eight topics, or search the blog.
Are posts dated?
Yes. Every post shows when it was published and when it was last updated.
Do posts link to the docs?
Developer posts link to the matching page on docs.didit.me and to the API reference.
Is the blog the same as the docs?
No. The blog explains rules, markets and product changes for a general reader, while docs.didit.me holds the integration guides and the API reference. Developer posts link the matching docs page and the API reference they describe.

Compliance built in

Audited, certified and attested.

We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center

  • Regulation encoded into your flows

    Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.

  • Ready for AMLR

    Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.

  • Tested in Spain's Treasury sandbox

    Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.

  • Audited, not self-declared

    iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • SOC 2 Type 2
  • ISO 27001
  • iBeta Level 1 and Level 2
  • EU regulator attestation
  • FSM youth protection
  • GDPR
  • EBA remote onboarding
  • MiCA compatible
  • FIDO Alliance member
  • AMLREU AML Regulation ready

Integration · Didit MCP

Run Didit from your own AI agent

Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
  • Run investigationsAsk why a session was declined, review cases, search people and companies.
  • Change rulesCreate payment rules, test them on past data and switch them on.
  • Pull reportsAsk for numbers, exports or the audit log.

Verify your first user today.

Start free

Free sandbox. Credit applies to work-email sign-ups.