Skip to content

CosmicLoad is a GCP project demonstrating 🌐 global load balancing, πŸ“ˆ auto-scaling, and πŸ›‘οΈ Cloud Armour for security. It distributes traffic across regions, ensuring βœ… high availability and ⚑️ low latency.❌❌ Due To credit limitation the below URL resources may not be available ❌❌

Notifications You must be signed in to change notification settings

moshdev2213/CosmicLoad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🌌 CosmicLoad: GCP Global Load Balancer

22 (2)

🌟 Global LoadBalancer Response

Group 12

🌟 Project Overview

CosmicLoad is a cloud infrastructure project designed to explore and implement 🌐 Google Cloud Platform's (GCP) Global Load Balancer. This project demonstrates how to effectively distribute user requests across multiple regions and availability zones, ensuring:

  • βœ… High Availability
  • πŸš€ Fault Tolerance
  • ⚑️ Minimal Latency
    by leveraging Google's global infrastructure.

πŸ”₯ Key Features

  1. Global Load Balancing 🌎: Distributes traffic between two regions (US Central & Asia Southeast).
  2. Instance Templates πŸ–₯️: Built with Ubuntu OS.
  3. Instance Groups πŸ› οΈ:
    • us-central (Iowa): Includes 4 availability zones.
    • asia-southeast1 (Singapore): Includes 3 availability zones.
  4. Cloud Armour πŸ›‘οΈ: Blocks requests originating from India to improve security and control access.(Due to free-account gcp restricts cloud-armour quota)
  5. Auto Scaling πŸ“ˆ: Dynamically scales instances based on CPU utilization:
    • us-central: Min 4 instances, max 8 instances.
    • asia-southeast1: Min 3 instances, max 6 instances.
  6. Traffic Distribution πŸ”„: Uses the global load balancer to distribute traffic and ensure low-latency access to users worldwide.

πŸ’» Components Breakdown

1. Instance Templates πŸ–₯️

  • Configured GCE Ubuntu instances running Apache web server in:
    • us-central-a (Iowa)
    • asia-southeast1-a (Singapore)

2. Instance Groups πŸš€

  • us-central: Autoscaled group across 4 availability zones (a, b, c, f) with 4 minimum and 8 maximum instances.
  • asia-southeast1: Autoscaled group across 2 availability zones (a, b) with 3 minimum and 6 maximum instances.

3. Global Load Balancer 🌐

  • Configured a Global Load Balancer to distribute incoming traffic across the instance groups in both regions. This ensures:
    • πŸ“Š High Availability: Continues serving traffic even if a region fails.
    • ⚑️ Low Latency: Directs users to the region closest to them for faster response times.

4. Cloud Armour πŸ›‘οΈ

  • Implemented Cloud Armour to block traffic from India. This helps:
    • πŸ› οΈ Filter out requests from unwanted regions.
    • πŸ§‘β€πŸ’» Maintain security by controlling access based on geographical locations.

5. Auto-Scaling πŸ“ˆ

  • Autoscaling based on CPU utilization to optimize resource usage and reduce costs:
    • us-central: Scales between 4 to 8 instances.
    • asia-southeast1: Scales between 3 to 6 instances.

πŸ”¨ Steps to Reproduce

Prerequisites βœ…

  1. GCP Account with billing enabled.
  2. Knowledge of GCP services like Compute Engine, Load Balancer, and Cloud Armour.
  3. Optional: Familiarity with Terraform or gcloud CLI for resource management.

πŸ› οΈ 1. Create Instance Templates

  • Use the GCE Ubuntu image and install the Apache web server on the instances in both regions.

πŸ› οΈ 2. Create Instance Groups

  • Create an instance group for each region:
    • us-central with autoscaling (min 4, max 8).
    • asia-southeast1 with autoscaling (min 3, max 6).

πŸ› οΈ 3. Set Up Global Load Balancer 🌎

  • Configure a GCP Global Load Balancer to route incoming traffic across the instance groups in both regions.

πŸ› οΈ 4. Configure Cloud Armour πŸ›‘οΈ

  • Set up Cloud Armour to block requests from India or any other unwanted geographic location.

πŸ› οΈ 5. Test and Verify βš™οΈ

  • Send user traffic from different locations to verify:
    • βœ… Traffic distribution across regions.
    • 🚫 Requests from blocked regions are denied.
    • πŸ“ˆ Instances are auto-scaling based on load.

🧰 Tech Stack

  • Google Cloud Platform (GCP):
    • 🌍 Compute Engine
    • ⚑️ Global Load Balancer
    • πŸ” Cloud Armour
  • Ubuntu: Operating system on the instances.
  • Apache Web Server: Hosting web services on each instance.
  • Terraform: Optional, for automating infrastructure provisioning.

About

CosmicLoad is a GCP project demonstrating 🌐 global load balancing, πŸ“ˆ auto-scaling, and πŸ›‘οΈ Cloud Armour for security. It distributes traffic across regions, ensuring βœ… high availability and ⚑️ low latency.❌❌ Due To credit limitation the below URL resources may not be available ❌❌

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages