Skip to content

Latest commit

 

History

History
78 lines (59 loc) · 2.65 KB

README.md

File metadata and controls

78 lines (59 loc) · 2.65 KB

Autoscaler tool for Cloud Spanner

Autoscaler

Forward messages from Cloud Scheduler to the Poller function topic.
Home · Poller component · Scaler component · Forwarder component · Terraform configuration · Monitoring

Table of Contents

Overview

The Forwarder function takes messages published to PubSub from Cloud Scheduler, checks their JSON syntax and forwards them to the Poller PubSub topic. The topic can belong to a different project that the Scheduler.

This function is needed only in the distributed deployment because Cloud Scheduler can only publish to topics in the same project as the Scheduler.

Architecture

architecture-forwarder

The Cloud Spanner instances reside in a given application project.

  • 1 . Cloud Scheduler lives in the same project as the Cloud Spanner instances.

    2a. Cloud Scheduler publishes its messages to the Forwarder topic in the same project.

    2b. The Forwarder Cloud Function reads messages from the Forwarder topic, and

    2c. Forwards them to the Polling topic. The Polling topic resides in a different project.

    3 . The Poller function reads the messages from the polling topic and further continues the process as described in the main architecture section.

It is important to note that Autoscaler infrastructure is now distributed across several projects. The core components reside in the Autoscaler project An instance of Cloud Scheduler, the Forwarder topic and the Forwarder Function reside in each of the application projects.

Configuration parameters

Using the Forward function forwards to the PubSub specified in the environment variable POLLER_TOPIC.

Required

Key Description
POLLER_TOPIC PubSub topic the Poller function listens on