Search code examples
restamazon-web-servicesscalingmarklogic

Can MarkLogic REST API instances scale independently of their underlying database?


The MarkLogic documentation states that each REST API instance must have its own Modules database. As I understand, the Modules database is used for storing XQueries. Assuming that I can live without this, and am developing a MarkLogic database without using XQuery to persist data, is it possible to:

  • Create multiple applications that point to the same content database
  • Create multiple REST API instances that point to the same content database
  • Scale each REST API instance independently of the associated content database

What I'd like to achieve is an infrastructure where the content database is scaled independently of the REST API instances that persist and retrieve data to and from it. The purpose of this is to manage instances in an AWS AutoScaling Group, so that REST API instances can be invoked and dropped based on the degree of traffic.


Solution

  • Paul:

    The REST API requires a modules database for internal use as well as extensions.

    That doesn't, however, restrict your ability to create multiple REST servers for the same content database. Each REST server has its own modules database, but the modules database doesn't have to be larger -- a single forest will almost always be enough.

    If you want to add and drop preconfigured REST servers, you might want to take a close look at Packaging, which can propagate the configuration for a REST server and its modules database as well as the content of the modules database to a new cluster.

    Erik Hennum