メインコンテンツまでスキップ

「Extend App」のレプリカ上限とリソース割り当て

Last updated on February 11, 2025

Overview

This article walks you through how to configure your Extend app's limit of replicas and allocation of CPU and and memory in the AccelByte Gaming Services (AGS) Admin Portal.

Configuration limits

Replicas

Each type of Extend app can have one up to 60 replicas.

Resources (CPU and memory)

Each Extend app type has its own range for allowed CPU and memory allocation considering the reserved resources for the internal component, as shown in the table below.

TypeReserved CPU (Per VM)Reserved CPU (Per Replica)CPU RangeReserved Memory (Per VM)Reserved Memory (Per Replica)Memory Range
Extend Override475 millicores110 millicores1 – 1,415 millicores1,498 MB120 MB1 – 2,382 MB
Extend Service Extension475 millicores110 millicores1 – 1,415 millicores1,498 MB120 MB1 – 2,382 MB
Extend Event Handler475 millicores310 millicores1 – 1,215 millicores1,498 MB1,144 MB1 – 1,358 MB

Calculating CPU allocation for desired replicas

注意

This example is only to demonstrate how to calculate the CPU allocation economically. Please also consider your own system needs for CPU, if your system need More CPU please allocate based on your own calculations.

This is an example how to calculate CPU for your app based on the number of replicas that you wish to be hosted in one VM

Given:

  • Type: Extend Service Extension app
  • Maximum Configurable CPU: 2,000 millicores
  • Reserved CPU (Per VM): 475 millicores
  • Reserved CPU (Per Replica): 110 millicores
  • Number of Replicas to be hosted: 2

To calculate the needed configurable CPU per Extend app, follow these steps:

  1. Calculate the reserved CPU for the replicas:

    Reserved CPU (for replicas) = 110 millicores * 2 = 220 millicores
  2. Calculate the total reserved CPU:

    Total Reserved CPU = 475 millicores + 220 millicores = 695 millicores
  3. Calculate the remaining configurable CPU:

    Remaining Configurable CPU = 2,000 millicores - 695 millicores = 1,305 millicores
  4. Calculate the configurable CPU per Extend app replica:

    Configurable CPU per Extend App Replica= 1,305 millicores / 2 = 652.5 millicores

Therefore, the configurable CPU per Extend app is 652.5 millicores.

Calculating memory allocation for desired replicas

注意

This example is only to demonstrate how to calculate the Memory allocation economically. Please also consider your own system needs for Memory, if your system need More Memory please allocate based on your own calculations.

This is an example how to calculate Memory for your app based on the number of replicas that you wish to be hosted in one VM

Given:

  • Type: Extend Service Extension app
  • Maximum Configurable Memory: 4,000 MiB
  • Reserved Memory (Per VM): 1,498 MiB
  • Reserved Memory (Per Replica): 120 MiB
  • Number of Replicas to be hosted: 2

To calculate the needed configurable memory per Extend app, follow these steps:

  1. Calculate the reserved memory for replicas:

    Reserved Memory (for replicas) = 120 MiB * 2 = 240 MiB
  2. Calculate the total reserved memory:

    Total Reserved Memory = 1,498 MiB + 240 MiB = 1,738 MiB
  3. Calculate the remaining configurable memory:

    Remaining Configurable Memory = 4,000 MiB - 1,738 MiB = 2,262 MiB
  4. Calculate the configurable memory per Extend app:

    Configurable Memory per Extend App = 2,262 MiB / 2 = 1,131 MiB

Therefore, the configurable memory per Extend app is 1,131 MiB.

備考

If the CPU and memory have different calculations on how many replicas a VM can host, the system will always follow the lower limit.

For example:

  1. Based on CPU (652.5 milicores), a VM can host 2 replicas.
  2. Based on Memory (2000 MB), a VM can host 1 replica. Since memory is the limiting factor, the system will allow only 1 replica per VM, even though the CPU could support more.

Configure replicas limit and resource allocation

To configure the replicas limit and resource allocation of an Extend app, follow these steps:

注記

The CPU and memory allocation of an Extend app can also be configured during creation, on the Create New Extend app form. The resource allocation set during creation can later be adjusted, if needed.

  1. On the AGS Admin Portal sidebar, go to Extend and select the Extend app menu where your app is in.

  2. From the list of Extend apps, click on the name of the Extend app you want to update to open its details page.

  3. At the top-right side of the details page, click on the settings button (gear icon). The Settings page appears.

    Extend app settings

  4. On the Settings page of the Extend app, configure the replicas limit and resource allocation as needed:

    Settings page

    • Replicas: adjust the minimum and maximum number of replicas the Extend app is allowed to have. The replicas limit can be up to 60 replicas.
    • Resources
      • CPU: adjust the Extend app's CPU allocation using millicores. Note that 1 CPU unit is equivalent to 1,000 millicores. For example, to allocate 0.5 of a CPU to the Extend app, set the value to 500 millicores.
      • Memory: adjust the Extend app's memory allocation using MB.
  5. Click Save to apply your changes.

    warning

    If the Extend app you're configuring is currently running, the app will automatically restart after you save your changes to apply them.