Search code examples
cloud-foundrymicroservicesscaling

When scaling a Cloud Foundry app, is the memory split among the instances?


I have an application deployed through Cloud Foundry which has to be scaled. This can be achieved using the command cf scale, where the scaling can be done either horizontally (adjust number of instances) or vertically (adjust disk space limit and memory limit).

Suppose that I scale my application such that it has 5 instances and 32 GB memory. Does each instance get to have 32 GB memory, or is the memory divided among the 5 instances, resulting in 6.4 GB memory per instance?


Solution

  • The memory and disk specified are on a per application instance basis [1].

    In your example:

    • App Instance 1: 32Gb memory
    • App Instance 2: 32Gb memory
    • App Instance 3: 32Gb memory
    • App Instance 4: 32Gb memory
    • App Instance 5: 32Gb memory

    [1] https://docs.cloudfoundry.org/devguide/deploy-apps/cf-scale.html