kmesh icon indicating copy to clipboard operation
kmesh copied to clipboard

Add proposal for circuit breaker

Open Okabe-Rintarou-0 opened this issue 1 year ago • 8 comments
trafficstars

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes: Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Okabe-Rintarou-0 avatar May 29 '24 13:05 Okabe-Rintarou-0

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (main@4014ee9). Learn more about missing BASE report.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4014ee9...26cb8e7. Read the comment docs.

codecov-commenter avatar May 30 '24 05:05 codecov-commenter

I didnot see the response recording, how could we achieve that?

hzxuzhonghu avatar Jun 04 '24 02:06 hzxuzhonghu

I didnot see the response recording, how could we achieve that?

can we use this https://github.com/weaveworks-plugins/scope-http-statistics/blob/master/ebpf-http-statistics.c?

I'm busy for taking examines these two weeks, so my progress may be slow recently.

Okabe-Rintarou-0 avatar Jun 04 '24 06:06 Okabe-Rintarou-0

Can we maintain a statistic structure map in ebpf (so that can be accessed in user space), recording http statistic information like: number of connections, number of requests. We hook some functions in ebpf to collect this info, and we can do circuit breaker logic using golang in user space.

Okabe-Rintarou-0 avatar Jun 04 '24 08:06 Okabe-Rintarou-0

Agree, there need response handling

hzxuzhonghu avatar Jun 04 '24 08:06 hzxuzhonghu

I tried https://eunomia.dev/zh/tutorials/23-http/, works.

127.0.0.1:59434(src) -> 127.0.0.1:8000(dst)
payload: GET / HTTP/1.1
Host: 0.0.0.0:8000
User-Agent: curl/7.81.0
Acc
127.0.0.1:8000(src) -> 127.0.0.1:59434(dst)
payload: HTTP/1.0 200 OK
Server: SimpleHTTP/0.6 Python/3.10.12
Date: Tu

Okabe-Rintarou-0 avatar Jun 04 '24 12:06 Okabe-Rintarou-0

Mostly LGTM, so outlier detection can be designed separately

Yes, I think so.

Okabe-Rintarou-0 avatar Jul 18 '24 06:07 Okabe-Rintarou-0

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

kmesh-bot avatar Oct 31 '24 09:10 kmesh-bot