Skip to content

Phase 2: Connection Pooling & State Caching #48

@jessfortemnaturae8717

Description

@jessfortemnaturae8717

Overview

Migrate to AWS SDK v3 with connection pooling and add Redis-backed state cache.

Target: 200-500ms state lookups → <50ms (70% cache hit rate)

Tasks

2.1 AWS SDK v3 Migration

  • Migrate to @aws-sdk/client-* packages
  • Enable HTTP/2 multiplexing
  • Configure keep-alive connection pooling
  • Add retry with exponential backoff

Files:

  • src/state/aws/*.ts

2.2 State Cache Layer

  • Add ioredis dependency
  • Implement cache-aside pattern
  • Add cache hit/miss metrics
  • Support cache invalidation via MCP tool

New files:

  • src/cache/state-cache.ts
  • src/cache/redis-client.ts

Cache TTLs:

Resource TTL
S3 bucket 60s
RDS instance 30s
EC2 instance 30s
IAM role 300s

2.3 GCP/Azure Parity

  • Apply same optimizations to other cloud providers

Dependencies

ioredis: ^5.3.0
@aws-sdk/client-s3: ^3.500.0
@aws-sdk/client-rds: ^3.500.0
@aws-sdk/client-ec2: ^3.500.0

Timeline

Week 2-3


Part of: Multi-Agent Scaling Roadmap (Pro Feature)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions