Load balancing configurations for SAP Hybris

As mentioned in one of my previous post if not setup correctly clustered environment can be a nightmare. Below are some of the configurations worth noting beforehand:

Server Affinity: a lost session

An HTTP (s) session should always be served by only one SAP Hybris application server otherwise session will be lost and user would need to re-login, even worse anonymous user will lose his cart and all other settings. To avoid this embarrassing experience, enable Sticky Session at application load balancing layer which will stick one session to one SAP hybris server.

Redirect rules: 

Very often redirect rules are defined at load balancing layer to redirect complete URL (base + context )-e.g. http://doodle.com/fun to base URL  e.g. http://doodle.com.

Here one exception should be medias because their urls are appended with /medias at end of base URL and redirecting these URLs to base URL wont load medias:

eg. a call to medias URL –  e.g. http://doodle.com/medias/abc/456789.jpg will be replace with http://doodle.com which will fail loading of medias into SAP Hybris applications.

 

 

Production Infrastructure for SAP Hybris

What is an ideal production server setup? How many servers, cores or nodes do you or customer need?

A production system should not be “it works” but it should be a full-fledged performance setup.

The production setup really varies from customer to customer but in general: one BackOffice server with couple of storefront servers along with webservers, solr servers and a load balancer is very standard infrastructure.

prod-setup

Measurement Metric:

Hybris gauges its performance with page impressions/ second/ core. Standard hybris accelerator comes with a ballpark 10-15 page impressions/second/core. Here fun part is – most of projects start with 1-2 pi/s/core and there can be seriously optimized applications where >50 pi/s/core can be found.

So it’s advised to analyse customer’s requirements with representative data rather than proposing a typically standard infrastructure setup.

 

 

 

How to set up a svn environment for hybris projects?

Maintaining a version system for any project is one of the most crucial aspect. Hybris projects are not special in this regard. They also do have the same life cycle in terms of development. We need to maintain different environments like SIT, UAT etc. To provide a local development environment is also equally important.

Since the size of OOB Hybris is huge, it is difficult to put everything in SVN (or GIT). Also it is not advisable. The hybris is improvising every day. A new release should not give us pain in terms of development.

The best practice for versioning a hybris project could be:

  • Put only custom folder, containing customized extensions to versioning software.
  • Pass latest local.properties, localextensions locally to each developers.
  • Maintain copy of latest local.properties, localextensions in each of servers like development and SIT, UAT etc.
  • Hybris software is wrapped around custom folder on each environment.
  • Media folder could possibly in SVN or can be passed locally like property files.

2

  • production environment, normally is not connected to SVN. Rather we take the most stable copy from UAT and deploy it using some deployment tool like , bamboo.