Livoa LogoLivoa
AWS VPC
Client EC2 Tasks
Client Task 1


CDP Client

Session ID: abc123

Client Task 2


CDP Client

Session ID: def456

Client Task 3


CDP Client

Session ID: ghi789

API Gateway


Load Balancer

/sessions API

Amazon SQS


Session Request Queue

Task Status Queue

Orchestrator Service


Session Manager

Task Scheduler

Resource Allocator

Health Monitor

State Store


Redis/DynamoDB

Session State

Task Registry

Port Mappings

SSH Tunnel Manager


Secure Tunnels

Port Forwarding

Connection Pool

Emulator EC2 Tasks Pool
BUSY


Emulator Task 1


Session: abc123

SQS Listener

Android Emulator
Port: 5554

Chrome + CDP
CDP Port: 9222

BUSY


Emulator Task 2


Session: def456

SQS Listener

Android Emulator
Port: 5556

Chrome + CDP
CDP Port: 9223

AVAILABLE


Emulator Task 3


Session

Listener (Active)

Android Emulator Ready to Start

Chrome + CDP Not Started

... More Available Tasks ...
Legend:


Busy Task Available Task SSH Tunnel SQS Message

• Each Emulator Task has an SQS Listener polling for new session requests

• Available tasks compete for messages using SQS visibility timeout

Request Flow with SQS:


1. Client EC2 Task sends request to API Gateway with SSH tunnel config

2. API Gateway publishes session request message to SQS queue

3. Available Emulator Tasks poll SQS queue for new requests

4. First available task picks up message and starts emulator + Chrome

5. SSH Tunnel established between Client and assigned Emulator Task

6. Task updates status to BUSY and stops polling until session ends

design

by Rahav

0
0 uses