gitpod
gitpod copied to clipboard
Limit connections
Description
Introduce limiting of new connections created per minute.
Related Issue(s)
Fixes #https://github.com/gitpod-io/gitpod/issues/10651
How to test
- Open a workspace in the preview environment
- Run roblox scanner
Release Notes
Limit the rate at which network connections can be made by a workspace
Werft options:
- [x] /werft with-preview
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Based on the discussion in the RFC the following changes have been made.
- Limiting is now setup by ws-daemon instead of workspacekit
- We use an annotation (gitpod.io/netConnLimit) to detect workspaces that should be limited
- The helper functions for nsinsider have been moved to to their own package so that they can be used outside of IWS.
- The go library for nftables recently gained support for dynsets, so using nft is not necessary anymore
- Metrics for dropped bytes/packets have been added
- The network limiting annotation is now set by ws-manager if the WORKSPACE_CONNECTION_LIMITING feature is send as part of the request. The decision to send the flag will be made based on the plan that the user is on. This part is not yet fully implemented because we do need to deploy this PR first, so that the flag can be handled by ws-manager.
:wave: @Furisto I've added this to our project for team visibility, and changed the description from "fixes" to "related to" (assuming merging this PR won't necessarily close the epic).
Will this audit connections (which we would have limited), or, will it actually limit? I assume audit, but wanted to double check.
@kylos101
Will this audit connections (which we would have limited), or, will it actually limit? I assume audit, but wanted to double check.
It will only audit them
/werft run with-clean-slate-deployment
:+1: started the job as gitpod-build-fo-connlimit.37
(with .werft/
from main
)
@utam0k PTAL
/unhold