Skip to main content

Synchronization

The typegate run in either on of the following modes:

  • Single instance mode: a single typegate instance runs all the workloads;
  • Synchronized mode: the workloads can be shared accross multiple typegate instances.

System setup

To enable multiple typegate instance support, the system need the following services:

ServiceRole
Load balancerShare the loads accross the different typegate instances
Redis databaseUsed for synchronization between typegate instances
S3 storageStore all the shared files/artifacts for the typegate instances
Typegate instancesObvious
System setup

Load balancer

The setup does not require a specific load balancer software/hardware. Any load balancer can do the job.

Redis database

A single redis instance can be shared by multiple systems, configured with different database numbers.

S3 storage

Any S3-compatible object store is supported for the file/artifact storage.

One S3 storage might be shared by multiple systems. However, each system must be configured to use its own dedicated bucket.

Typegate instances

The typegate instances are configured with environment variables. All the instances of the system must share the same value for the synchronization variables.

See configuration for details.

Typegate configuration

The typegate instances that at the core of the system must share the configuration variables.

Synchronization variable names start with SYNC_.

warning
  • If no SYNC_* variable is present, the typegate will run in the default single instance mode.
  • The typegate will fail to start if any of the SYNC_* variables is present and some required SYNC_* variable is missing.
VariableDescription
SYNCREDIS_URL (_Required)URL to the Redis database. Must include the database number.
SYNCREDIS_PASSWORD (_Optional)Redis database password, can be included in SYNC_REDIS_URL;
SYNCS3_HOST (_Required)Hostname of the S3 store;
SYNCS3_REGION (_Required)S3 region;
SYNCS3_ACCESS_KEY (_Required)Access key for the S3 store credentials;
SYNCS3_SECRET_KEY (_Required)Access key secret for the S3 store credentials;
SYNCS3_PATH_STYLE (_Optional)true or false, force path style if true.
SYNCS3_BUCKET (_Required)The bucket to be used for the system (dedicated).

Synchronized mode features

  • Sharing typegraphs accross multiple typegate instances
  • History (WIP)