Create resource in GS2

Create a resource in each GS2 microservice.

First, let’s understand the relationship between projects, regions, and microservices.

Projects and microservices have the following data structure.

Gs2Project "1" *-- "many" Region
Region "1" *-- "many" Microservice
Microservice "1" *-- "many" Namespace
Namespace "1" *-- "many" Resource


A region exists directly under the project.

A region represents the region of the data center that GS2 uses to provide microservices.


There are various functions such as property management, matchmaking, in-game stores, etc. These are hosted on a per-region basis, and the microservices database is broken out by region.

While real-time communication is appropriate to run on the machine hosted in the region closest to the player, most of the microservices provided by GS2 are mostly functions that do not require as much real-time performance. Therefore, it is possible to deploy only GS2-Realtime in multiple regions, while keeping the other microservices in a single region.


Each microservice can have multiple namespaces. Namespaces are completely separate from each other, but can have multiple spaces.

When using GS2-Inventory, you can manage them separately as “namespace to hold consumable items”, “namespace to hold in-game currency”, and “namespace to hold acquired characters”.


Each namespace has its own resources. There are two main types of resources.

  • Master data
  • User data

Master Data

Master Data is an area that holds data predefined by the developer, such as GS2-Inventory, what items exist; GS2-Showcase, what products are sold; GS2-Schedule, what events are scheduled.

This is an area that contains data specified by the developer.

User Data

This is the data that game players individually store. For GS2-Inventory, how many items the player has; for GS2-Quest, which quests the player has already completed.

This is data that increases on its own as the game is run.

setup using the management console

Create a resource in a microservice using the Management Console.

Setup using GS2-Deploy

Create resources in microservices using GS2-Deploy

Setup using GS2-CDK

Create GS2-Deploy template using GS2-CDK