{"id":17090476,"url":"https://github.com/lawouach/ebpf-2021-talk","last_synced_at":"2025-04-12T22:25:12.941Z","repository":{"id":140739152,"uuid":"390375118","full_name":"Lawouach/ebpf-2021-talk","owner":"Lawouach","description":"Code for my talk at ebpf 2021 conference","archived":false,"fork":false,"pushed_at":"2021-08-04T11:02:07.000Z","size":20,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-26T16:21:46.244Z","etag":null,"topics":["devops","ebpf","reliability","reliably","sre"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lawouach.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-07-28T14:10:41.000Z","updated_at":"2022-08-12T01:57:50.000Z","dependencies_parsed_at":"2023-09-25T06:47:49.319Z","dependency_job_id":"f7f52f2e-205c-4bde-a736-2671f47b9169","html_url":"https://github.com/Lawouach/ebpf-2021-talk","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"6266c5bd15c17f17f9d4adcfbbddb3d59acb2d1f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lawouach%2Febpf-2021-talk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lawouach%2Febpf-2021-talk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lawouach%2Febpf-2021-talk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lawouach%2Febpf-2021-talk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lawouach","download_url":"https://codeload.github.com/Lawouach/ebpf-2021-talk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248638864,"owners_count":21137719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devops","ebpf","reliability","reliably","sre"],"created_at":"2024-10-14T13:54:11.018Z","updated_at":"2025-04-12T22:25:12.913Z","avatar_url":"https://github.com/Lawouach.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ebpf as a SRE datasource with Reliably\n\nThis repository contains the code of my lightning talk at the ebpf 2021\nconference. It is made of a very basic ebpf program that simply discards\nanything non TCP packets on an interface we attach to. At the application\nlevel we filter any packet not going or coming from a target port we\nare interested in. We then use this data to measure latency and error rates\nof requests/response to said server. The server is intended to return\nerrors from time to time.\n\nWe are prototyping how SRE can directly benefit from ebpf events to gain\nvisibility over their system. By transforming these events into indicators\nto publish to service level objects.\n\n## Requirements\n\n* a recent Linux kernel (\u003e 5.10)\n* Python 3.8+\n* BCC and BCC python for your system installed. Indeed the Python package\n  for BCC is not pip-installable so make you install with your system\n  package manager. On Ubuntu for example: `sudo apt install bpfcc python3-bpfcc`\n* A virtual environment:\n  ```\n  $ python3 -m venv --system-site-packages .venv\n  ```\n* Python dependencies:\n  ```\n  $ ./.venv/bin/pip install -r requirements.txt\n  ```\n* An authenticated [Reliably](https://reliably.com/docs/getting-started/) CLI\n* The [hey](https://github.com/rakyll/hey) load test program\n\n## Running\n\nOnce you have installed all the dependencies and authenticated against\nReliably, run the following commands.\n\n* The application server:\n\n  ```\n  $ ./.venv/bin/uvicorn --port=8000 server:app \n  ```\n\n* The `hey` program to induce some mild load on the server:\n\n  ```\n  $ hey -c 3 -q 10 -z 600s http://localhost:8000/\n  ```\n\n* The reliably's CLI. Run first the following\n  `$ reliably slo sync -m reliably.yaml`. This needs to be run only once.\n  Then run this command to watch your SLO:\n\n  ```\n  $ reliably slo report -m reliably.yaml -w\n  ```\n\n* The ebpf program:\n\n  ```\n  $ sudo .venv/bin/python3 script.py --reliably-config $HOME/.config/reliably/config.yaml\n  ```\n\n  This must run as root.\n\nOnce this is done, watch your SLO changing dependning on how the server\nreplies.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flawouach%2Febpf-2021-talk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flawouach%2Febpf-2021-talk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flawouach%2Febpf-2021-talk/lists"}