A note from 2026: This article was published in 2016. SAP hybris is now SAP Commerce Cloud, and Solr/SolrCloud support, bundled Solr versions, and cloud deployment options have changed significantly across releases; verify the current SAP Commerce Cloud search architecture before applying these workarounds.

Introduction

The traditional Hybris Solr cluster has a number of drawbacks, including a lack of failover and scaling capabilities. In this post, I explore SolrCloud as one of the possible options for resolving these issues.

To illustrate, the traditional Hybris Solr cluster looks like this:

Traditional Hybris Solr cluster architecture

This traditional architecture has a number of drawbacks as outlined above, including:

To mitigate these issues, there are a couple of different routes you can take.

Option 1:

Implementing a load balancer to manage search requests:

High-availability Solr configuration with load balancer

The drawback to this option is that the indexer is still not scalable, which was one of the main issues with the traditional architecture.

Option 2:

The second option, which I’ll be focusing on for the remainder of this post, is integrating Hybris with SolrCloud. This option resolves the scalability issue, provides better failover, and moves the cluster configuration out of the Hybris database.

The target architecture should look like this:

Target Hybris and SolrCloud distributed indexing architecture

To fully understand the SolrCloud solution, it’s necessary to first define the terminology that is used.

I’ve created a diagram below that shows how you can write to any node in the cluster, and it will redirect the query to the “Leader” node. Then, the leader node will redirect the query to storage. Ultimately, the client shouldn’t be aware of leaders and shards; they simply add new data to the cloud.

SolrCloud request routing to a leader node

The main benefits of using SolrCloud as storage for Hybris include:

Complexity

Out of the box, Hybris doesn’t support SolrCloud. Hybris knows nothing about SolrCloud collections; it works with cores. In the SolrCloud model, it needs to work with collections instead.

Solution

Technical details

In summary, there are two possible solutions to improve failover capability, supportability, and autoscaling over the traditional Hybris Solr cluster:

I chose the second option, as it overcomes more of the limitations of the traditional structure. Some of my notes:

© Rauf Aliev, July 2016