SShortSingh.
Back to feed

How to Build a Fault-Tolerant Rotating Proxy Pool in Python

0
·2 views

Web scraping at scale requires more than a single proxy, as IPs can be rate-limited, banned, or timed out by target sites. A robust solution involves building a proxy pool in Python that rotates IPs on every request attempt and retries failed requests using a fresh IP. The approach treats HTTP status codes like 429 and 5xx as retryable errors and applies exponential backoff to avoid overwhelming struggling targets. For multi-step workflows such as logins or cart sessions, sticky sessions allow a fixed IP to persist by pinning a session ID in the proxy credentials. Switching between rotating and sticky modes covers most real-world scraping scenarios without requiring separate infrastructure.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Reverse Proxy, Load Balancer, and API Gateway: Key Structural Differences Explained

A technical article published on DEV Community on July 13 by Folasayo Samuel Olayemi breaks down the structural differences between three commonly confused system design components. The piece focuses on Reverse Proxies, Load Balancers, and API Gateways, clarifying that despite frequent overlap in usage, they are not the same thing. The article is categorized under system design, architecture, and API topics and is estimated to be a seven-minute read. It aims to help developers better understand when and why to use each component in software architecture.

0
ProgrammingDEV Community ·

Reverse Proxy, Load Balancer, API Gateway: Key Differences Explained

As web applications scale, engineers place intermediary layers between users and backend servers to manage traffic and security. A reverse proxy sits in front of backend infrastructure, handling tasks like SSL termination, caching, compression, and IP anonymization without understanding business logic. Unlike a reverse proxy, a load balancer distributes incoming requests across multiple servers to prevent any single server from being overwhelmed during traffic spikes. An API gateway goes further by handling authentication, rate limiting, request routing, and API versioning, making it aware of business logic. Though all three components sit between clients and servers, they address distinct problems and are often used together in production systems.

0
ProgrammingDEV Community ·

Developer Plans AI Platform to Automate CAD/CAE Engineering Workflows

A developer is building an AI platform specifically designed to support CAD and CAE engineering workflows. The project aims to go beyond traditional embedding-based retrieval, which the developer argues struggles with complex CAD models, feature trees, and procedural design logic. The proposed system would use AI agents capable of engineering reasoning to help mechanical engineers automate tasks, set up simulations, and optimize designs. The long-term goal is an AI assistant that understands how engineering models are constructed, not just answers questions about them. The developer is seeking collaborators including engineers, AI researchers, and CAD/CAE specialists to help build the platform.

0
ProgrammingDEV Community ·

Open-Source 'Assessment-First' Course Uses LLM Rubric Grading, Not Chatbots

Developer Michael Tuszynski has released doerkit, an open-source statistics course built around the idea that LLM-powered rubric grading and spaced cumulative review are more effective than AI chatbots for improving student outcomes. The system grades written answers against predefined rubric criteria in roughly one second, returning specific feedback and partial credit rather than simply assigning scores. Two MIT-licensed repositories — doerkit and rubric-bench — have been published, with the latter providing regression and adversarial testing for any LLM-based grader. Tuszynski acknowledges significant gaps between the current demo and a deployable product, including missing LMS integration, multi-tenancy, FERPA compliance, and validation against human raters. The project's core findings note that grader warmth and severity are independently adjustable, that frontier models resist prompt injection better than cheaper alternatives, and that cumulative review showed the largest effect size in the underlying source study.