{"id":31381620,"url":"https://github.com/dipakdotyadav/redpanda-proxy","last_synced_at":"2026-05-18T09:06:59.243Z","repository":{"id":313517199,"uuid":"1051707043","full_name":"dipakdotyadav/redpanda-proxy","owner":"dipakdotyadav","description":"High-performance C# proxy for RedPanda/Kafka clusters with load balancing, health monitoring, and single endpoint access for clients","archived":false,"fork":false,"pushed_at":"2025-09-06T15:59:06.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-28T10:37:09.556Z","etag":null,"topics":["csharp","distributed-systems","dotnet","dotnet-core","kafka","load-balancer","microservices","proxy","redpanda","tcp-proxy"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dipakdotyadav.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-06T14:56:32.000Z","updated_at":"2025-09-06T15:59:10.000Z","dependencies_parsed_at":"2025-09-06T16:31:18.578Z","dependency_job_id":"97af0af2-0ca8-48ca-ad59-3813c93b3d3f","html_url":"https://github.com/dipakdotyadav/redpanda-proxy","commit_stats":null,"previous_names":["dipakdotyadav/redpanda-proxy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dipakdotyadav/redpanda-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipakdotyadav%2Fredpanda-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipakdotyadav%2Fredpanda-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipakdotyadav%2Fredpanda-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipakdotyadav%2Fredpanda-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dipakdotyadav","download_url":"https://codeload.github.com/dipakdotyadav/redpanda-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipakdotyadav%2Fredpanda-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33172173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T05:43:36.989Z","status":"ssl_error","status_checked_at":"2026-05-18T05:43:19.133Z","response_time":71,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["csharp","distributed-systems","dotnet","dotnet-core","kafka","load-balancer","microservices","proxy","redpanda","tcp-proxy"],"created_at":"2025-09-28T10:36:39.895Z","updated_at":"2026-05-18T09:06:59.236Z","avatar_url":"https://github.com/dipakdotyadav.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n\r\n# Redpanda Proxy for RedPanda\r\n\r\nA high-performance, configurable Redpanda proxy written in C# that can load balance connections across multiple RedPanda brokers while presenting a single endpoint to Redpanda clients.\r\n\r\n## Features\r\n\r\n- **Multiple Load Balancing Strategies**: Round Robin, Random, Weighted, Least Connections\r\n- **Health Monitoring**: Automatic broker health checks and reconnection\r\n- **High Performance**: Asynchronous TCP forwarding with minimal overhead  \r\n- **Configurable**: JSON-based configuration with environment variable support\r\n- **Production Ready**: Comprehensive logging, error handling, and graceful shutdown\r\n- **Container Support**: Docker and Kubernetes ready\r\n\r\n## Quick Start\r\n\r\n1. Configure your brokers in `appsettings.json`\r\n2. Run with `dotnet run`\r\n3. Clients connect to the proxy on port 9092 (default)\r\n4. Proxy routes traffic to healthy RedPanda brokers\r\n\r\n## Configuration\r\n\r\nKey configuration options:\r\n- `ListenPort`: Port for client connections (default: 9092)\r\n- `LoadBalancing`: Strategy - RoundRobin, Random, Weighted, LeastConnections\r\n- `Brokers`: Array of broker configurations with host, port, weight, enabled status\r\n- `HealthCheckInterval`: Milliseconds between health checks (default: 10000)\r\n\r\n## Load Balancing Strategies\r\n\r\n- **Round Robin**: Equal distribution across brokers\r\n- **Random**: Random broker selection\r\n- **Weighted**: Distribution based on broker weights\r\n- **Least Connections**: Route to broker with fewest active connections\r\n\r\n## Production Deployment\r\n\r\n- Use systemd service for Linux deployments\r\n- Configure appropriate logging levels\r\n- Set up monitoring and alerts\r\n- Consider running multiple proxy instances behind a load balancer\r\n\r\n## Testing\r\n\r\nUse the included docker-compose.yml to test with 3 RedPanda instances:\r\n```bash\r\ndocker-compose up -d\r\n```\r\n\r\nThen test with any Kafka/Redpanda client connecting to localhost:9092.\r\n\r\n-----\r\n\r\n# Publish release build\r\n```\r\ndotnet publish -c Release -o ./publish\r\n```\r\n\r\n# Copy to server and set up systemd service\r\n```\r\nsudo cp kafka-proxy.service /etc/systemd/system/\r\nsudo systemctl enable kafka-proxy\r\nsudo systemctl start kafka-proxy\r\n```\r\n\r\n---------------\r\n# Test with kafka-console-producer\r\n```\r\nkafka-console-producer --bootstrap-server localhost:9092 --topic test-topic\r\n```\r\n\r\n# Test with kafka-console-consumer  \r\n```\r\nkafka-console-consumer --bootstrap-server localhost:9092 --topic test-topic --from-beginning\r\n```\r\n\r\n------------------\r\n# Override specific settings\r\n```\r\nexport KafkaProxy__ListenPort=9093\r\nexport KafkaProxy__LoadBalancing=LeastConnections\r\nexport KafkaProxy__Brokers__0__Host=new-broker.example.com\r\n```\r\n\r\n----------------------\r\n```\r\ndotnet run --KafkaProxy:ListenPort=9093 --KafkaProxy:LoadBalancing=Weighted\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdipakdotyadav%2Fredpanda-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdipakdotyadav%2Fredpanda-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdipakdotyadav%2Fredpanda-proxy/lists"}