Skip to content

Discussion: should HTTP/2 pool skip over not ready connections? #216

@Goose97

Description

@Goose97

We sometimes encounter this error in our production release:

{:error, %Finch.Error{reason: :read_only}}

This error indicates that the checked out pool is close for writing and only able to read responses. If the pool is in :disconnected or :connected_read_only state, it's not able to make requests (I'll refer these two states as not_ready from now on). This problem is worsen if the reconnect process takes longer, eg: when network connections are unstable.

My point is we should be able to filter out not_ready pools while performing lookup. Right now, there's no way to efficiently get pool's current state other than sending a message to it (GenServer.call, :sys.get_state, ...). How about lifting the pool state to an ets table?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions