NEWStandard createTask and in.php APIs. Change the address and you are connected.View API docs
GATESOLVER

Glossary

Containerized scraping: workers you can copy and scale

Containerized scraping means packaging a scraper with its runtime, libraries and browser into a container image so it runs the same way on a laptop, a server or a cluster.

Why containers fit scraping

Scrapers break in boring ways: a different Python version on the server, a missing font that changes how a page renders, a browser build that does not match the driver. A container image freezes all of that. You build once, test the image, and every worker you start is identical. When you need more throughput, you start more copies of the same image instead of configuring new machines.

A minimal worker image

FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY worker.py .
# the key comes from the environment at run time, never from the image
ENV GS_ENDPOINT=https://gatesolver.com
USER 1000
CMD ["python", "worker.py"]

For browser workers, start from an image that already contains a matching browser and its system libraries. The official images published by the Playwright project are a common choice; check the current tags in its documentation and pin one version so upgrades happen on purpose.

Shape of a scaled setup

  • A shared queue (Redis, a database table or a broker) holds URLs, so any worker can take the next job. See request queue.
  • Stateless workers pull a job, fetch, parse, write the result and acknowledge. If a container dies, the unacknowledged job returns to the queue.
  • Storage outside the container: results go to a database or object storage, never to the container's own disk.
  • An orchestrator such as Docker Compose for one host, or Kubernetes and similar platforms for many, which restarts failed workers and changes the replica count.

Resource limits for browsers

Headless Chromium needs more shared memory than the small default many container runtimes give, which shows up as random tab crashes. Raise the shared memory size or use the browser flag that avoids /dev/shm. Set memory limits per container so one runaway page cannot take down the host, and recycle browsers after a fixed number of pages to keep memory growth in check (see headless browser).

Secrets and configuration

Pass API keys and proxy credentials as environment variables or orchestrator secrets at run time. Do not bake them into the image, since images get pushed to registries and shared. This applies to your GateSolver key as well: one key per account, so if it leaks you replace it, and every container must receive the new value. Keeping it in one secret makes that a single change (see API key).

Solving challenges across many workers

Scaling workers multiplies the challenges you meet. Each container can create and poll its own tasks, since there is no cap on concurrent tasks; what you share is the per key budget of 600 requests per minute. With twenty containers polling every three seconds, that budget can fill quickly, so either space polling sensibly or route solves through one small solver service that batches result checks. Log the task ID with each job so a failed page can be traced to its solve.

Observability

Ship logs to one place and count outcomes per worker: pages fetched, challenges met, tasks solved, tasks failed. A sudden rise in challenges across all containers usually means a target changed its protection, not that one worker is broken.

Common questions

Do I need Kubernetes for containerized scraping?

No. Docker Compose on one server handles many workers. A cluster platform helps once you need many hosts or automatic scaling.

Why do headless browsers crash inside containers?

Often because the container has too little shared memory. Raise the shared memory size or use the flag that avoids it.

Where should scraped results be stored?

Outside the container, in a database or object storage, so data survives when a worker restarts or is replaced.

How should API keys reach my containers?

As environment variables or secrets supplied at run time, never written into the image itself.

How do many workers share one solving account?

Each worker can create tasks freely; they share the per key request budget, so space polling or centralize it.

Keep reading