Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

From hours to minutes: Optimizing Red Hat Developer Hub performance testing with immutable LDAP images

Optimizing testing with immutable LDAP images

September 17, 2026
Shashank Kestwal
Related topics:
Migration
Related products:
Red Hat Developer Hub

    At Red Hat, our CI/CD pipelines are the heartbeat of our development process. However, as we scaled the Red Hat Developer Hub performance testing framework, we hit a wall. Our environment setup time was ballooning, turning what should have been a seamless verification step into a long waiting game. For performance engineering in catalog-dependent applications, deployment and catalog population speed directly dictate your feedback loops. Here's how we solved this problem.

    Our performance bottleneck was runtime user generation. Within Red Hat Developer Hub, users and groups represent critical catalog entity types, serving as the foundation for the application's role-based access control (RBAC) across various pages and actions. A primary objective in our performance engineering involves modulating the entity volume within the Red Hat Developer Hub database. Furthermore, simulating high levels of concurrent active users requires a specific volume of pre-existing entries. At massive scales, our legacy simulation methods simply were not feasible, necessitating a fundamental architectural rethink.

    We've identified the bottleneck: The "old way".

    Previously, our testing framework relied on generating thousands of users and groups on-the-fly using the Keycloak Admin REST API . Every single user entry necessitated a serialized chain of REST operations. When handling massive catalog scales, we attempted to bypass the single-entry limitations of the Keycloak API by leveraging hardware-level concurrency. However, even with multi-threaded workers, the environment provisioning remained a time-intensive marathon. After populating the database, we had to get back to the performance framework to continue with its next steps for the added sync processes (Red Hat Developer Hub to keycloak synchronization). This is where Red Hat Developer Hub used to make paginated HTTP calls to Keycloak to sync users to its database.

    This tedious process, executed only to start the deployment, left us with increased failures. We had to cope up with complex code structures and fallback logic because the tests might get network timeouts, rate limits, and so on, leading to an incomplete catalog, and failed test runs.

    More components means more potential failure points.

    The pivot: Enhanced infrastructure

    We decided to replace runtime user generation with pre-built LDAP container Images. Instead of creating users during test deployment, we treat our LDAP environment as immutable infrastructure. We moved from an on-demand generation model to a pre-built artifact model.

    Importing 10,000 users with ldapadd (online, using the protocol) is slow because it validates access control and schema for every entry. So we switched to slapadd, which writes directly to the LMDB database files while the server is offline. Deploying these environments is streamlined: By defining the user and group requirements through the <RBAC_POLICY>-<USER_COUNT>u-<GROUP_COUNT>g convention, the appropriate pre-baked images are automatically retrieved.

    This shift required us to pre-compute our state into artifacts rather than generating data at runtime. We also reached a state where keycloak shifted from data source for the catalog to authentication gateway only, which is (most of the time) a customer behaviour.

    Our Containerfile now uses a multi-stage build:

    Stage 1: Builder

    The first stage uses slapadd to populate the OpenLDAP database:

    # Stage 1: populate the OpenLDAP database offline
    FROM docker.io/osixia/openldap:1.5.0 AS builder
    COPY slapd.conf /etc/ldap/slapd.conf
    COPY seed.ldif  /tmp/seed.ldif
    RUN mkdir -p /var/lib/ldap && \
        slapadd -f /etc/ldap/slapd.conf -l /tmp/seed.ldif

    Stage 2: Runtime

    The second stage copies the populated database files into the final image:

    # Stage 2: ship only the populated database
    FROM docker.io/osixia/openldap:1.5.0
    COPY --from=builder /var/lib/ldap /var/lib/ldap

    Using slapadd bypasses the network layer completely and writes directly to the database files. This makes it ideal for seeding databases during builds. As a result, when our test environment starts, the LDAP server boots with 10,000+ users already indexed in Keycloak, ready to query. For the Red Hat Developer Hub part, we wait for the first sync of the catalog to complete.

    UsersGroupsPopulate Time BeforePopulate Time After
    1,00010,00037 Min21 Sec
    5,00050,0005 Hour 34 Min1 Min 1 Sec
    10,000150,00022+ Hours2 Min 8 Sec

    By moving to this pre-built, immutable architecture, we fundamentally altered our performance matrix. The old workflow was serial, as shown in figure 1:

    The old API-based architecture was serial and slow.
    Figure 1: The old API-based architecture was a serial pipeline, and slowed when scaled.

    The new workflow, illustrated in figure 2, introduced parallel processes and was significantly faster:

    The new workflow moved user and group population from a runtime dependency to an immutable build artifact, which made the test environment deterministic, the catalog provider realistic, and the setup time constant regardless of scale.
    Figure 2: The new workflow moves user and group population from a runtime dependency to an immutable build artifact, making the test environment deterministic, the catalog provider realistic, and the setup time constant regardless of scale.

    The benefits

    The change moved the user and group population from a runtime dependency into an immutable build artifact, which made the test environment deterministic, the catalog provider realistic, and the setup time constant regardless of scale.

    • Resolution of "flaky test" errors caused by incomplete provisioning and guaranteed data consistency across thousands of test cycles
    • Improved trend analysis through stable performance baselines, reduced deployment durations, and unlocked capabilities for very high catalog population counts for performance testing
    • Faster troubleshooting and scenario reproduction since the dataset remains constant while Red Hat Developer Hub evolves

    Core principles for engineering success

    To overcome challenges in large-scale test environment setups, we recommend applying these 3 principles validated during our migration:

    • Favor binary protocols: Moving from JSON/REST to the binary LDAP protocol reduced network latency and serialization overhead by great margins.
    • Pre-compute or compute-at-runtime: If your test data is static (or predictable), then don't generate it during the deployment phase. Use static data sources like containers, storage drives (and so on) to bake in your state.
    • Optimize for read-heavy workloads: By adding the memberOf attribute, we essentially pre-computed our graph relationships, eliminating the need for expensive N+1 queries during catalog ingestion.

    Conclusion

    Our architectural shift didn't just save us time, it provided us with reproducible baselines. Whether we're testing with 1,000 or 100,000 users, we now have a consistent, reliable environment that accurately mirrors the enterprise reality our customers have in production.

    Related Posts

    • Integrating Red Hat Single Sign-On version 7.4 with Red Hat Directory Server (LDAP)

    • Red Hat Developer Hub software template authoring with rhdh-templates

    • What's New in Red Hat Developer Hub 1.10?

    Recent Posts

    • From hours to minutes: Optimizing Red Hat Developer Hub performance testing with immutable LDAP images

    • Catching poor LLM performance and accuracy before deployment

    • Build a unified CI/CD control plane with Red Hat Developer Hub

    • Why your Kafka topic ignores retention.ms (and how to fix it)

    • Constraining AI agents with Red Hat AI: Containment, identity, and governance

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility
    Ask AI