Chapter 3. Scaling RHMAP Core application

This guide explains how to horizontally scale RHMAP Core components. OpenShift pod scaling allows to react to changes in traffic and allocate the necessary resources to handle current demand. Pods can be scaled manually or automatically, based on resource usage. For more information please refer to OpenShift documentation.

3.1. Scaling pods

RHMAP Core pods can be scaled using either oc command tool or web console.

To scale pods execute following commands:

  1. Target oc tool to RHMAP OpenShift master

    oc login http://yourcluster.url
  2. Fetch all RHMAP Core deployment configurations to get name of component you want to scale

    oc get dc
  3. To scale any of deployment configurations execute:

    oc scale --replicas=2 dc name

    Where name represents deployment configuration name returned by previous command.

Note

OpenShift3 also supports autoscaling that would allow components to scale based on resource usage. For more information please refer to OpenShift documentation.

3.2. Example replica configuration for Core

Example commands that would scale most used components:

oc scale --replicas=2 dc fh-ngui
oc scale --replicas=2 dc millicore
oc scale --replicas=2 dc fh-supercore
oc scale --replicas=2 dc fh-aaa
oc scale --replicas=2 dc ups

3.3. Limitations

Not all RHMAP Core pods can be scaled using OpenShift api.

3.3.1. Database and cache pods

Increasing the replica count to more than one for any of these pods is not supported. Scaling following pods to more than one replica may cause loss of data and make platform unstable.

ComponentReason

mysql

Mysql is currently a standalone instance without support for master slave replication.

mongodb

Mongdb is a standalone instance that is not part of a replica set.

memcached

Not configured for replication. Core components are configured use single memcached instance.

redis

Not configured for replication. Core components are configured use single redis instance.

3.3.2. Storage and monitoring components

ComponentReason

gitlab-shell

Git repository data cannot be shared between nodes

fh-scm

Git repository data cannot be shared between nodes

nagios

Monitoring service - only one instance needed. Multiple instances of this pod may cause alert duplication.