Blazing iconBlazing

GCP Provider

Edit on GitHub

Configure Google Cloud Platform for Blazing Core Compose deployments

Google Cloud Platform (GCP) is a primary provider offering enterprise-grade reliability, global infrastructure, and cost-effective networking options.

Basic Configuration

YAML

Configuration Reference

Status Field

YAML

Define GCP's priority in provider selection:

  • prefer: Primary provider (use first)
  • allow: Acceptable provider (use if preferred unavailable)
  • fallback: Emergency provider (use only when others fail)

Network Tier

YAML

GCP offers two network tiers with significant cost differences:

| Tier | Egress Cost | IPv6 | Routing | Best For | |------|-------------|------|---------|----------| | Standard | $0.005/GB | ❌ No | Regional | Cost-optimized (default) | | Premium | $0.085/GB | ✅ Yes | Global | Low-latency worldwide |

Cost Impact: Standard tier is 17x cheaper for egress.

Example Calculation (1TB monthly egress):

  • Standard: $5/month
  • Premium: $85/month
  • Savings: $80/month (1600% cost reduction)

When to use Premium:

  • Global user base requiring low latency
  • IPv6 requirement
  • Real-time applications (gaming, video streaming)

When to use Standard (recommended):

  • Regional deployments
  • Cost-sensitive applications
  • Most web/API services

IP Version

YAML

Important: Standard tier only supports IPv4.

| Combination | Valid | Notes | |-------------|-------|-------| | Standard + IPv4 | ✅ | Recommended default | | Standard + IPv6 | ❌ | Not supported | | Premium + IPv4 | ✅ | Works but expensive | | Premium + IPv6 | ✅ | Required for IPv6 |

Certificate Issuer

YAML

Specify the certificate issuer for TLS:

  • letsencrypt-prod: Production Let's Encrypt (default)
  • letsencrypt-staging: Testing (higher rate limits)
  • custom: Your own certificate authority

Node Pool Configuration

GKE Standard mode with spot instance support for cost optimization.

YAML

Baseline vs Burst Replicas

Baseline replicas (min_replicas):

  • Always run on standard (on-demand) nodes
  • Guaranteed availability
  • No interruption risk
  • Higher cost but reliable

Burst replicas (above min_replicas):

  • Can run on spot nodes (if configured)
  • 60-90% cost savings
  • May be preempted (24h max lifetime)
  • Ideal for stateless workloads

Cost Example

Service with min_replicas: 3, max_replicas: 10:

YAML

With node_pools.burst: spot:

| Scenario | Standard Nodes | Spot Nodes | Cost | |----------|----------------|------------|------| | Baseline (3 replicas) | 3 | 0 | $0.10/hour | | Peak (10 replicas) | 3 | 7 | $0.17/hour | | All standard | 10 | 0 | $0.33/hour |

Monthly savings: ~$350/month (48% reduction)

Node Pool Configuration

YAML

Available burst options:

  • spot: Use spot instances for burst (recommended)
  • standard: Use on-demand for burst (higher cost, no preemption)

Public Gateway Configuration

The public gateway provides external connectivity to your services.

YAML

Gateway Fields

| Field | Type | Default | Description | |-------|------|---------|-------------| | enabled | boolean | false | Deploy public gateway | | static_ip | string | auto | IP allocation (auto or specific) | | sql.enabled | boolean | false | PostgreSQL wire protocol support | | sql.port | number | 5432 | SQL port (e.g., 26257 for CockroachDB) | | http.enabled | boolean | false | HTTP/HTTPS ingress | | http.port | number | 8080 | HTTP port | | http.path_prefix | string | / | Optional path prefix | | gateway.replicas | number | 1 | Gateway replica count | | gateway.resources.cpu | string | 500m | CPU allocation | | gateway.resources.memory | string | 1Gi | Memory allocation |

SQL Gateway Example

Expose CockroachDB with both SQL and HTTP admin:

YAML

Access:

  • SQL: postgresql://gateway-ip:26257/db
  • Admin UI: https://gateway-ip/admin

HTTP Only Example

Standard web application:

YAML

Pricing: $49/month (includes static IP, certificates, load balancing)

Complete Examples

Production Configuration

High reliability with cost optimization:

YAML

Cost-Optimized Configuration

Maximum cost savings:

YAML

High-Performance Configuration

Global low-latency:

YAML

Database Gateway Configuration

PostgreSQL-compatible database:

YAML

GCP-Specific Features

Regions Available

GCP has 35+ regions worldwide:

North America:

  • us-central1 (Iowa)
  • us-east1 (South Carolina)
  • us-west1 (Oregon)
  • us-west2 (Los Angeles)

Europe:

  • europe-west1 (Belgium)
  • europe-west2 (London)
  • europe-north1 (Finland)
  • europe-west4 (Netherlands)

Asia:

  • asia-east1 (Taiwan)
  • asia-southeast1 (Singapore)
  • asia-northeast1 (Tokyo)

GKE Features

  • Autopilot: Not used for org workloads (Standard mode only)
  • Spot Instances: 60-90% savings for burst workloads
  • Node Auto-repair: Automatic node health checks
  • Workload Identity: Secure service account binding
  • Binary Authorization: Image signing and verification

Integration with GCP Services

Core Compose integrates with:

  • Cloud Monitoring: Metrics and alerting
  • Cloud Logging: Centralized log aggregation
  • Cloud Load Balancing: Global/regional load balancers
  • Cloud Armor: WAF and DDoS protection
  • Certificate Manager: Automated TLS certificates

Best Practices

1. Use Standard Tier by Default

YAML

Only upgrade to Premium if you need:

  • IPv6 support
  • Global routing with minimal latency
  • Real-time gaming or video streaming

2. Enable Spot for Burst Workloads

YAML

This provides:

  • Reliability for baseline traffic
  • Cost savings for peak traffic
  • Automatic fallback to on-demand if spot unavailable

3. Single Gateway per Deployment

Enable gateway on only one provider:

YAML

Avoid multiple gateways to minimize costs.

4. Right-Size Gateway Resources

For typical workloads:

YAML

Scale up for high-traffic scenarios:

YAML

Troubleshooting

"IPv6 not supported with Standard tier"

Error:

Plain Text

Solution:

YAML

"Node pool exhausted"

Error:

Plain Text

Solution: Increase cluster size or reduce replicas:

YAML

"Gateway timeout"

Error:

Plain Text

Solution: Increase gateway resources:

YAML

Next Steps