Redesign browser pool and the whole browsers subpackage · Issue #1744 · apify/crawlee-python · GitHub
Skip to content

Redesign browser pool and the whole browsers subpackage #1744

Open

Description

@vdusek

❗ Note: This is a starting point for discussion, not a final decision. The team should review and adjust before any implementation begins.❗

Context

The browser pool and the whole browsers subpackage have several architectural issues and poor abstractions. These make it difficult to extend (e.g., remote browser support in #1743 and maybe even lifecycle hooks in #1741). We've discussed these issues a few times already. With the introduction of #1743, this may be a good opportunity to finally establish a well-structured and robust design for the browser pool. This effort should also be coordinated with the new user pool initiative in #1435.

Reference

This will be a breaking change.

Activity

  1. added
    t-toolingIssues with this label are in the ownership of the tooling team.
    on Feb 12, 2026
  2. changed the title [-]Redesign browsers subpackage[/-] [+]Redesign browser pool and the whole browsers subpackage[/+] on Feb 12, 2026
  3. added this to the 2.0 milestone on Feb 17, 2026
  4. Pijukatel commented on Mar 5, 2026

    @Pijukatel
    Collaborator

    Also to consider is a scenario like this: #1776 , where there is a pre-existing persistent browser context created outside of our code.
    Possible fix: #1778

  5. vdusek commented on Mar 5, 2026

    @vdusek
    CollaboratorAuthor

    cc @janbuchar, @l2ysho, as I believe you may have already been working on this.

  6. janbuchar commented on Mar 9, 2026

    @janbuchar
    Collaborator

    I believe we should first come up with the "ideal" interface of a browser pool. Essentially, the BrowserCrawler in JS only calls newPage and retireBrowserController in case of a session error. Then, the BrowserController is used mostly for cookie management.

    The rest of the interface is either unused, or used by downstream users.

    Then there is the Controller and Plugin infrastructure, and I'm not sure if I can reliably describe what those do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request.t-toolingIssues with this label are in the ownership of the tooling team.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions