All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Modifying Chromium Source Code to Replace DevTools HTTP Handler with Redis Pub/Sub for Browser Automation

By

deadf00d

5mo ago· 7 min readen

Summary

The article describes a technical solution for improving browser automation by modifying Chromium's source code to replace the traditional DevTools HTTP handler with a Redis Pub/Sub system. This addresses the latency issue where Chromium's Remote Debugging Server takes time to start, forcing developers to repeatedly poll for availability. The author explains how they performed 'surgery' on Chromium's source code to create a more efficient architecture where browser sessions can be spun up in large numbers for automation tasks across various websites.

Key quotes

· 5 pulled
The traditional approach is to run Chromium inside containers and expose a DevTools endpoint using the --remote-debugging flag.
The main challenge with this setup is that the Chromium Remote Debugging Server don't become available instantly, it takes time for the browser to start.
This forces you to repeatedly poll for availability.
Replacing DevTools' HTTP Handler With Redis Pub/Sub
While working at previous engagement, we frequently needed to spin up large numbers of browser sessions to automate tasks across various websites.
Snippet from the RSS feed
Replacing DevTools' HTTP Handler With Redis Pub/Sub

You might also wanna read