fiber icon indicating copy to clipboard operation
fiber copied to clipboard

📝 [Proposal]: Add support for fasthttp.HostClient

Open zhangyongding opened this issue 1 year ago • 5 comments

Feature Proposal Description

fasthttp.HostClient can be used for external load balancing, example: fasthtp.LBClient

Alignment with Express API

N/a

HTTP RFC Standards Compliance

N/a

API Stability

N/a

Feature Examples

N/a

Checklist:

  • [X] I agree to follow Fiber's Code of Conduct.
  • [X] I have searched for existing issues that describe my proposal before opening this one.
  • [X] I understand that a proposal that does not meet these guidelines may be closed without explanation.

zhangyongding avatar Dec 06 '24 01:12 zhangyongding

@zhangyongding Where would we add this in Fiber?

gaby avatar Dec 06 '24 03:12 gaby

https://github.com/gofiber/fiber/tree/main/client

zhangyongding avatar Dec 09 '24 00:12 zhangyongding

@efectn Any idea why we use fasthttp.Client instead of fasthttp.HostClient ? Adding this feature requires HostClient, I think.

gaby avatar Dec 09 '24 00:12 gaby

fasthttp.HostClient is a good choice if you only target one host. However, we want to support multiple hosts in fiber client, so i prefered using fasthttp.Client rather than fasthttp.HostClient. I think if you have an edge-case, requiring using fashttp.HostClient, it might not be a good idea to use Fiber client which purposes general usage.

efectn avatar Mar 12 '25 21:03 efectn

Have we considered supporting the fasthttp lbclient feature?

zhangyongding avatar Mar 20 '25 10:03 zhangyongding