-3.3 C
New York
Thursday, February 5, 2026

Excessive availability patterns for AWS IoT Greengrass utilizing Pacemaker


Edge computing downtime in industrial IoT environments might be each inconvenient and dear. Programs on the edge require steady operation to keep up enterprise continuity. Whereas AWS IoT Greengrass delivers highly effective edge computing capabilities, reaching true enterprise-grade excessive availability requires extra orchestration. This put up reveals tips on how to use Pacemaker, a cluster useful resource supervisor, to construct resilient edge infrastructure with automated failover.

On this walkthrough, you’ll be taught to implement energetic/passive and energetic/energetic excessive availability patterns utilizing Pacemaker with AWS IoT Greengrass, full with automated failover, state replication, and monitoring integration.

The excessive availability problem for edge computing

Conventional cloud purposes profit from built-in redundancy and auto-scaling, nevertheless, purposes on the sting face distinctive challenges:

  • Bodily isolation: Edge gadgets function in distant places with restricted connectivity
  • Useful resource constraints: In contrast to cloud environments, edge sources are finite and valuable
  • Service criticality: Edge failures can halt bodily operations instantly
  • Restoration complexity: Guide intervention at distant websites is dear and gradual

AWS IoT Greengrass addresses many edge computing challenges, however excessive availability requires considerate structure past a single machine deployment.

How Pacemaker enhances AWS IoT Greengrass

Pacemaker helps you construct extremely accessible AWS IoT Greengrass deployments by way of cluster administration capabilities:

Confirmed reliability

  • Utilized in mission-critical environments for over a decade
  • Handles advanced failure situations with subtle fencing mechanisms
  • Works in each energetic/passive and energetic/energetic configurations

AWS IoT Greengrass-aware useful resource administration

  • Displays Greengrass service well being and part states
  • Manages shared storage for seamless state switch
  • Coordinates failover of dependent providers and community sources

Enterprise-ready integration

  • Integrates with present Linux infrastructure administration
  • Helps advanced dependency chains and useful resource constraints
  • Offers detailed logging and monitoring for compliance necessities

Collectively, these instruments preserve your edge workloads working throughout {hardware} failures or community disruptions.

Structure overview: Excessive availability patterns

AWS IoT Greengrass excessive availability might be carried out utilizing two major patterns, every optimized for various use instances.

Lively/Passive configuration: Maximizing knowledge consistency

This mode maximizes knowledge consistency and automatic failover—perfect for mission-critical purposes the place knowledge integrity and repair continuity are paramount. One node runs Greengrass actively whereas the opposite stands prepared in standby mode. A software-based, block-level knowledge replication service like Distributed Replicated Block Gadget (DRBD) ensures prompt state synchronization between nodes, enabling failover with zero knowledge loss and sustaining machine id.


┌─────────────────┐    ┌─────────────────┐ 
│   Major Node  │    │  Standby Node   │ 
│                 │    │                 │ 
│ ┌─────────────┐ │    │ ┌─────────────┐ │ 
│ │ Greengrass  │ │    │ │ Greengrass  │ │ 
│ │   ACTIVE    │ │    │ │  STANDBY    │ │ 
│ └─────────────┘ │    │ └─────────────┘ │ 
│                 │    │                 │ 
│ ┌─────────────┐ │    │ ┌─────────────┐ │ 
│ │   DRBD      │◄┼────┼►│   DRBD      │ │ 
│ │  Major    │ │    │ │ Secondary   │ │ 
│ └─────────────┘ │    │ └─────────────┘ │ 
└─────────────────┘    └─────────────────┘ 

Key advantages:

This configuration ensures full state preservation throughout failover with sub-minute downtime, zero knowledge loss for in-flight transactions and significant operations, whereas sustaining machine id, certificates, and Stream Supervisor persistence seamlessly.

Actual-world use instances:

Lively/Passive configurations are important in situations requiring zero or minimal knowledge loss, similar to in-flight leisure methods that deal with offline fee processing and battery manufacturing services the place manufacturing strains depend upon steady knowledge stream from vital manufacturing sensors and ML mannequin outputs to keep up operational integrity and high quality management.

Lively/Lively: Most throughput and scalability

This mode maximizes throughput and supplies horizontal scaling for high-volume workloads. A number of unbiased Greengrass situations run concurrently throughout cluster nodes, with clever load balancing distributing work primarily based on node well being and capability. Every node operates with its personal distinctive machine credentials and configurations.


┌─────────────────┐    ┌─────────────────┐ 
│   Node 1        │    │   Node 2        │ 
│                 │    │                 │ 
│ ┌─────────────┐ │    │ ┌─────────────┐ │ 
│ │ Greengrass  │ │    │ │ Greengrass  │ │ 
│ │   ACTIVE    │ │    │ │   ACTIVE    │ │ 
│ └─────────────┘ │    │ └─────────────┘ │ 
│                 │    │                 │ 
│ ┌─────────────┐ │    │ ┌─────────────┐ │ 
│ │Load Balancer│◄┼────┼►│Load Balancer│ │ 
│ │ (A/P Mode)  │ │    │ │ (Standby)   │ │ 
│ └─────────────┘ │    │ └─────────────┘ │ 
└─────────────────┘    └─────────────────┘ 

Key advantages:

These configurations allow horizontal scaling for high-throughput situations, enhance useful resource utilization throughout nodes, and supply swish degradation underneath partial failures.

Actual-world use instances:

Lively/Lively configurations are perfect for high-volume situations similar to automotive elements manufacturing services and large-scale manufacturing operations with a number of manufacturing strains, the place every node handles completely different line segments to offer each redundancy and elevated processing capability for real-time analytics and anomaly detection.

Configuration choice information

Use Lively/Passive for purposes that require zero knowledge loss, shared state, and machine id preservation. This sample works properly once you want a single level of management and might settle for failover instances underneath one minute.Use Lively/Lively once you want excessive throughput and horizontal scaling. This sample fits purposes that may function independently with out shared state, the place load distribution supplies operational advantages, and swish degradation is preferable to finish failover.

implement the answer

The entire playbook, together with detailed configuration examples and testing procedures, is out there within the GitHub respository. This supplies an Lively/Passive implementation automation utilizing Ansible which you could customise to your particular necessities. Lively/Lively setup steps are additionally accessible in MANUAL-SETUP-GUIDE throughout the identical repository.

Setup steps

1. Atmosphere setup

Clone the repository and arrange the event setting

git clone https://github.com/aws-samples/sample-greengrass-ha-pacemaker.git
cd sample-greengrass-ha-pacemaker
./scripts/setup-dev-env.sh && supply .venv/bin/activate

2. Configure cluster secrets and techniques

Generate and encrypt cluster credentials utilizing Ansible Vault

# Create vault password file
echo "your_secure_password" > .vault_pass
chmod 600 .vault_pass
# Auto-generate encrypted secrets and techniques
./scripts/setup-vault.sh

This creates `vars/cluster-vault.yml` with encrypted credentials for cluster authentication and DRBD replication.

3. Put together Greengrass credentials

Observe: This strategy is designed for testing and demonstration functions solely.

Obtain Greengrass set up recordsdata from AWS IoT Console.

  1. Navigate to AWS IoT Core console → Greengrass → Core gadgets
  2. Click on ‘Arrange one core machine’ → ‘Arrange a tool with installer obtain’
  3. Identify your machine (e.g., ‘greengrass-ha-device’)
  4. Choose or create a Factor Group
  5. Obtain each recordsdata and rename them:
    1. Rename hash-setup.sh to greengrass-setup.sh
    2. Rename hash.zip to greengrass-certs.zip
  6. Place recordsdata in `recordsdata/greengrass/` listing

4. Deploy and configure

This may deploy AWS EC2 and needed sources to check on AWS.

# Deploy infrastructure
make cdk-deploy && make cdk-inventory
# Retrieve SSH personal key
./scripts/get-ssh-key.sh
# Configure HA cluster
ansible-playbook playbooks/setup/system-prerequisites.yml -i stock/cdk-dev-hosts
ansible-playbook playbooks/setup/configure-ha.yml -i stock/cdk-dev-hosts --vault-password-file .vault_pass

5. Validate and take a look at

Examine cluster standing and optionally, run an automatic failover take a look at.

# Examine cluster standing
ansible node-1 -i stock/cdk-dev-hosts -m shell -a "sudo pcs standing" --become
# Check failover (optionally available)
ansible-playbook playbooks/testing/test-failover-simulation.yml -i stock/cdk-dev-hosts --vault-password-file .vault_pass

The automated assessments validate useful resource migration, DRBD promotion, and knowledge consistency throughout failover.

Cleanup

This may destroy the sources created by CDK.

# Destroy infrastructure
make cdk-destroy

Conclusion: Enterprise-ready edge computing

AWS IoT Greengrass and Pacemaker collectively present the excessive availability wanted for mission-critical edge deployments. By utilizing Pacemaker’s cluster administration capabilities, organizations can confidently deploy Greengrass the place reliability is important.Whether or not you’re managing industrial management methods, processing real-time analytics, or orchestrating edge AI workloads, this architectural sample supplies the muse for resilient, scalable edge computing that what you are promoting can depend upon.

Subsequent steps

Able to implement enterprise-grade excessive availability to your AWS IoT Greengrass deployments? Right here’s your path ahead:

Repository: sample-greengrass-ha-pacemaker


Concerning the authors

Yong Ji Yong Ji is a Senior Options Architect at Amazon Net Companies (AWS), serving to enterprises construct progressive cloud-based options. With over 25 years of expertise in cloud structure, analytics and knowledge engineering, Yong brings deep technical experience and a ardour for fixing advanced enterprise challenges. Outdoors of labor, Yong is a passionate desk tennis participant.

Siddhant Srivastava Siddhant Srivastava is a Software program Improvement Engineer with AWS IoT Greengrass. He has 3+ years of expertise in edge computing with deal with constructing resilient, scalable distributed methods. Outdoors work, Siddhant participates in soccer leagues and billiards tournaments.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay Connected

0FansLike
0FollowersFollow
0SubscribersSubscribe
- Advertisement -spot_img

Latest Articles