Skip to content

Gracefully check liveness of a backend connection #258

Closed
@djshow832

Description

@djshow832

Development Task

In #198, the PR checks the liveness of a backend connection by peeking one byte. There are some disadvantages:

  • It costs 1ms to check
  • It wraps the connection with another buffer, which makes it even heavier

I found that in go-sql-driver, there's a smarter way to do this: go-sql-driver/mysql#934
It solves the above 2 problems and it must be stable because it runs in go driver for 4 years.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions