{"id":50996090,"url":"https://github.com/vfolgosa/bifrost-proxy","last_synced_at":"2026-06-20T09:33:09.925Z","repository":{"id":365129221,"uuid":"1270681132","full_name":"vfolgosa/bifrost-proxy","owner":"vfolgosa","description":"A lightweight Layer-7 Kafka proxy. Route traffic across clusters with port-based routing, SASL passthrough, and autonomous failover.","archived":false,"fork":false,"pushed_at":"2026-06-16T02:42:41.000Z","size":2604,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-16T03:08:12.993Z","etag":null,"topics":["devops","failover","golang","kafka","kafka-proxy","load-balancing","proxy","sre"],"latest_commit_sha":null,"homepage":"https://github.com/vfolgosa/bifrost-proxy","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vfolgosa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"docs/roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-16T00:31:02.000Z","updated_at":"2026-06-16T02:42:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vfolgosa/bifrost-proxy","commit_stats":null,"previous_names":["vfolgosa/bifrost-proxy"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/vfolgosa/bifrost-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfolgosa%2Fbifrost-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfolgosa%2Fbifrost-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfolgosa%2Fbifrost-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfolgosa%2Fbifrost-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vfolgosa","download_url":"https://codeload.github.com/vfolgosa/bifrost-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vfolgosa%2Fbifrost-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34565240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["devops","failover","golang","kafka","kafka-proxy","load-balancing","proxy","sre"],"created_at":"2026-06-20T09:33:07.587Z","updated_at":"2026-06-20T09:33:09.907Z","avatar_url":"https://github.com/vfolgosa.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/bifrost-banner.svg\" alt=\"Bifrost\" width=\"600\"/\u003e\n\u003c/p\u003e\n\n# Bifrost — Kafka L7 Proxy\n\n\u003e *\"Route Kafka traffic across the nine realms.\"*\n\n**Bifrost** is a lightweight, stateless **Layer-7 Apache Kafka proxy** written in Go. Routes Kafka protocol traffic using **port-based routing** — each BU gets its own port, zero client-side changes beyond `bootstrap.servers`.\n\n## ✨ Features\n\n| | |\n|---|---|\n| 🔌 **Port-Based Routing** | One port per BU. No TLS/SNI required. |\n| 🔐 **SASL Passthrough** | Forwards SCRAM-SHA-512 and PLAIN credentials transparently. |\n| 📝 **Metadata Rewrite** | Intercepts Metadata responses, rewrites broker addresses. |\n| 🎛️ **Three Modes** | `active_passive` · `load_balance` · `single` |\n| ❤️ **Health Checks** | SASL-authenticated Metadata pings with configurable thresholds. |\n| 📈 **Live Dashboard** | Per-cluster health, records, bytes, failover events. |\n| 🔥 **Hot Reload** | Edit `config.yaml` — picks up changes without restart. |\n| 📡 **Prometheus** | `proxy_health_status` · `proxy_failover_total` · `proxy_connections_active` |\n\n## 🏗️ Architecture\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/architecture.svg\" alt=\"Bifrost Architecture\" width=\"100%\"/\u003e\n\u003c/p\u003e\n\n## 🎛️ Cluster Modes\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/modes.svg\" alt=\"Cluster Modes\" width=\"100%\"/\u003e\n\u003c/p\u003e\n\n## 🚀 Quick Start\n\n```bash\n# Start everything (Kafka + Bifrost + Redpanda + Prometheus)\ndocker compose up -d\n\n# Produce\necho \"hello bifrost\" | kcat -P -b localhost:9094 \\\n  -X security.protocol=SASL_PLAINTEXT \\\n  -X sasl.mechanisms=PLAIN \\\n  -X sasl.username=admin -X sasl.password=admin-secret \\\n  -t logistics-topic\n\n# Consume\nkcat -C -b localhost:9094 \\\n  -X security.protocol=SASL_PLAINTEXT \\\n  -X sasl.mechanisms=PLAIN \\\n  -X sasl.username=admin -X sasl.password=admin-secret \\\n  -t logistics-topic -o beginning -e\n\n# Dashboard\nopen http://localhost:8080\n```\n\n## 📊 Monitoring\n\n| Service | URL |\n|---------|-----|\n| Bifrost Dashboard | http://localhost:8080 |\n| Prometheus | http://localhost:9090 |\n| Redpanda kafka1 | http://localhost:8081 |\n| Redpanda kafka2 | http://localhost:8082 |\n\n## ⚙️ Configuration\n\n```yaml\nproxy:\n  bind_address: \"0.0.0.0\"\n  metrics_port: 8080\n\nclusters:\n  # active_passive — DR failover\n  finance:\n    port: 9093\n    mode: \"active_passive\"\n    active: \"primary\"\n    primary: \"pkc-11111.us-east-1.aws.confluent.cloud:9092\"\n    secondary: \"pkc-22222.us-east-2.aws.confluent.cloud:9092\"\n    health_check:\n      enabled: true\n      auto_failover: true\n      auto_failback: false\n\n  # load_balance — weighted distribution\n  logistics:\n    port: 9094\n    mode: \"load_balance\"\n    primary:\n      bootstrap: \"pkc-33333.us-east-1.aws.confluent.cloud:9092\"\n      weight: 70\n    secondary:\n      bootstrap: \"pkc-44444.us-east-2.aws.confluent.cloud:9092\"\n      weight: 30\n    health_check:\n      enabled: true\n      auto_rebalance: true\n\n  # single — standalone cluster\n  # legacy:\n  #   port: 9095\n  #   mode: \"single\"\n  #   primary: \"old-kafka.internal:9092\"\n```\n\n## 📚 Documentation\n\n| Doc | Description |\n|-----|-------------|\n| [Consumer Behavior](docs/consumer-behavior.md) | How consumers work with load balancing, failover, ordering, and deduplication |\n| [Failover \u0026 Message Durability](docs/failover.md) | Adaptive health checks, detection windows, message loss risk, client config |\n| [Broker Rollout](docs/broker-rollout.md) | Proxy behavior during Kafka rolling restarts and leader changes |\n| [Roadmap](docs/roadmap.md) | Planned features and next steps |\n\n## 📁 Project Structure\n\n```\nbifrost-proxy/\n├── cmd/proxy/              # Entry point\n├── internal/\n│   ├── config/             # YAML parsing, validation, hot reload\n│   ├── protocol/           # Kafka wire protocol parser\n│   ├── proxy/              # TCP listener, connection handler, routing\n│   ├── routing/            # SASL, metadata, produce/fetch routing\n│   ├── pool/               # Connection pool, leader cache\n│   ├── health/             # Health check engine\n│   ├── failover/           # State machine, controller, rebalance\n│   ├── logger/             # Structured JSON logging\n│   └── server/             # HTTP server + embedded dashboard\n├── test/                   # Test scripts\n├── assets/                 # Diagrams and branding\n├── docker-compose.yml      # Full dev stack\n├── Dockerfile              # Multi-stage build\n└── config.example.yaml     # Example config\n```\n\n## 📄 License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvfolgosa%2Fbifrost-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvfolgosa%2Fbifrost-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvfolgosa%2Fbifrost-proxy/lists"}