Optimization & Audit of Proxy Integration System

Job ID: 40098502

Budget: £36 – £0 GBP

# Proxy System Improvement Project - Consultant Brief

## Project Overview

We need an experienced developer to audit, improve, and optimize our residential proxy integration system. This is a 3-4 week focused project with potential for ongoing maintenance.

## Current System

**Architecture:**
- Rails 7.2 app managing proxy configuration via `ProxyConfigService`
- Node.js/TypeScript automation service using Puppeteer
- Oxylabs residential proxies with country-specific routing
- 7-day sticky sessions for consistent IPs
- Multiple jobs: message sending, conversation sync, reply checking

**Current Issues:**
1. Proxy sessions expire causing `ERR_TUNNEL_CONNECTION_FAILED` errors
2. Inconsistent error handling across different automation jobs
3. High proxy costs (~5,000+ requests/day for single account)
4. No automatic session regeneration when sessions expire
5. Limited monitoring and cost visibility

## Project Scope

### Phase 1: Critical Fixes (Week 1)
- [ ] Audit current proxy implementation across all jobs
- [ ] Fix session expiration handling with automatic regeneration
- [ ] Implement consistent error detection (`ERR_TUNNEL_CONNECTION_FAILED`)
- [ ] Add automatic recovery mechanisms
- [ ] Test all automation jobs with proxy enabled/disabled

### Phase 2: Cost Optimization (Week 2)
- [ ] Analyze current request patterns and identify waste
- [ ] Optimize resource blocking (images, fonts, analytics)
- [ ] Implement request deduplication
- [ ] Reduce unnecessary proxy requests by 30-50%
- [ ] Add request tracking and cost monitoring