api7 / api7/lua-resty-etcd

request help: Do not use keepalive when connecting etcd v3

Open
#139 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
203
Forks
58
PR merge metrics
No merged PRs in 30d

Description

Now etcd v3 uses keepalive. When the user has a proxy between APISIX and etcd, and the proxy setting timeout is lower than the time of updating connection in connection pool, it will cause APISIX to report an error failed to fetch data from etcd: closed.

Ref: https://github.com/api7/lua-resty-etcd/blob/master/lib/resty/etcd/v3.lua#L114

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/resty/etcd/v3.lua at the referenced line and inspect how the etcd v3 connection is configured and refreshed. Reproduce or trace the proxy-timeout scenario described in the issue, then verify that the connection behavior no longer causes APISIX to report a closed-connection error.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.