2018/11/21

How i discovered Nuxeo Docker Scaling


ECM is dead - Let me introduce you to this really good Content Service Platform: Nuxeo.

What i first noticed in Nuxeo Platform is its Cloud Ready architecture. It comes ready to use on AWS and it scales like described on the schema bellow.

To me, scalability means :

  1. no bottleneck
  2. modularity and extensibility

So far, i've experimented and checked :

1. DB agnostic and how simple it is to change from Postgres (SQL) to MongoDB (No SQL) for exemple. Brilliant ! My docker exemple is below with Mongo, but i also tested with Postgres and it really is as simple as edit a nuxeo.conf file. As DevOps, i can imagine it could should be a very useful pattern;
Modularity + 1

2. I started with the official Nuxeo Docker image. Then using docker-compose, i easily split my Nuxeo Project in one Nuxeo Server, one Elasticsearch and one Mongo. And later, it's possible to create an Elacticsearch node and clusterize Nuxeo Server too (as worker for asynchronous jobs) - again, a very useful pattern if you need to adjust your search or frontend performances; 
Modularity + 1

3. In general, performance and load distribution is difficult to test and measure. Nuxeo did their own benchmarks, but i wanted to make sure that nodes and specially the Nuxeo Server is ready to handle a huge web traffic. So i built a small Node js client based on nuxeo-js-client and tried to load test my Nuxeo Dockerized Platform (Nuxeo Server + Elastic + Mongo). I used Cadvisor as a monitoring tool. Here are the result I got:

Scenario 1, In one minute, more than 3 000 requests (read, update and create). CPU usage went up and fell down for all nodes similarly. Memory looks stable, no big peak. No real stress (10 ms request average).

windows (left to right) : Node js, Nuxeo, Elastic, Mongo.


Scenario 2, In two minutes, more than 12 000 requests (read, update and create), and then what i wanted to see: Memory following the speed-up ramp but CPU is staying moderate (compare to other scenarios) - other nodes receiving a continuous charge from Nuxeo Server Node. Is Nuxeo is dealing with memory to ramp up? yes, it allocates more memory to deal with the increase traffic, a good choice, specially in a Cloud context... but, most important here: 300 mixed reqs / sec - works like a charm! And Im pretty confident that it could handle more (regarding my config, docker, laptop etc...).

Notice : Nuxeo memory ramp-up, and what it looks like an Elasticsearch indexing in the middle - cool :)


Well done (30 ms request average) ! "No bottleneck" +1

I definitely need to go further, maybe in another post ? How and Elasticsearch is indexing all new contents ? Clustering ?...
But if you're interested in subject, the docs are here https://doc.nuxeo.com/nxdoc/nuxeo-cluster-scalability-options.

My Node Client, and Docker Gist, if you want to make your opinion :

Enjoy
@Mat