Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Enhancement: Introduce Auto-Scaling Support in AWS Infrastructure Setup #1326

@Rohit27305

Description

@Rohit27305

Overview

The current AWS deployment setup provisions static infrastructure without elasticity. This enhancement introduces auto-scaling support to improve resilience, cost efficiency, and performance during high scanning workloads.

Auto-scaling enables dynamic adjustment of compute resources based on demand, ensuring optimal resource usage and better scalability.

Motivation

  • OWTF workloads are unpredictable; auto-scaling helps reduce idle costs and avoid performance bottlenecks.
  • Elastic infrastructure aligns with DevOps and cloud-native deployment principles.
  • Enables users to deploy OWTF at scale with minimal manual intervention.

Proposed Solution

Integrate AWS Auto Scaling Groups (ASG) into the existing EC2-based infrastructure.

Implementation Plan

  1. Launch Template

    • Reuse existing OWTF AMI or instance configurations.
    • Define launch template parameters including security groups, instance type, and key pair.
  2. Scaling Policy

    • Configure dynamic scaling based on CPU utilization, network load, or queue length.
    • Support both target tracking and step scaling policies.
  3. Terraform Updates

    • Update infra/aws-terraform modules:
      • Create a new .tf file for ASG configuration.
      • Add variables for min_capacity, max_capacity, and desired_capacity.
      • Expose outputs for ASG name and scaling policy ARNs.
    • Maintain backward compatibility with static setups.
  4. Documentation Updates

    • Extend this README.md to include auto-scaling instructions.
    • Provide configuration examples for enabling/disabling ASG.
    • Add sample thresholds for custom scaling behavior.
  5. Optional Enhancements

    • Integrate CloudWatch alarms for monitoring and alerting.
    • Extend support for AWS Application Auto Scaling (ECS) for containerized deployments.

Benefits

  • Automatically scales resources up or down based on load.
  • Reduces operational costs during idle periods.
  • Improves fault tolerance and resilience.
  • Simplifies scaling for distributed workloads.

Impact

  • Affects infrastructure configuration only.
  • No changes to OWTF core codebase.
  • Fully backward compatible: manual/static provisioning continues to work.

Next Steps

  • Get maintainer approval for approach and implementation direction.
  • Prepare a pull request including:
    • New Terraform module for auto-scaling.
    • Updated documentation and examples.

Checklist

  • Maintainer review and feedback
  • Implement Terraform ASG module
  • Add input variables and outputs
  • Update infra/README.md with usage guide
  • Test auto-scaling in staging environment
  • Submit PR for review

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions