{"id":31831605,"url":"https://github.com/pennsail/dagor-grpc","last_synced_at":"2026-06-25T03:31:07.362Z","repository":{"id":280193285,"uuid":"941249416","full_name":"pennsail/dagor-grpc","owner":"pennsail","description":"This repo is an unofficial go-gRPC implementation of DAGOR, the wechat microservice overload control. It's a part of efforts to compare with our design: Rajomon.","archived":false,"fork":false,"pushed_at":"2025-03-01T21:10:09.000Z","size":21,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-08T02:04:05.904Z","etag":null,"topics":["microservice","overload","wechat"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pennsail.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}},"created_at":"2025-03-01T20:52:24.000Z","updated_at":"2025-07-01T04:27:07.000Z","dependencies_parsed_at":"2025-03-01T22:29:18.830Z","dependency_job_id":null,"html_url":"https://github.com/pennsail/dagor-grpc","commit_stats":null,"previous_names":["pennsail/dagor-grpc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pennsail/dagor-grpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pennsail%2Fdagor-grpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pennsail%2Fdagor-grpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pennsail%2Fdagor-grpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pennsail%2Fdagor-grpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pennsail","download_url":"https://codeload.github.com/pennsail/dagor-grpc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pennsail%2Fdagor-grpc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34758773,"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-25T02:00:05.521Z","response_time":101,"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":["microservice","overload","wechat"],"created_at":"2025-10-11T21:58:55.936Z","updated_at":"2026-06-25T03:31:07.341Z","avatar_url":"https://github.com/pennsail.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## DAGOR Open Source Implementation\n\n### Overview\n\n`dagor-grpc` is a gRPC interceptor library.\nThis repository contains an open-source implementation of the **DAGOR** overload control mechanism, which was originally proposed in the paper *\"Overload Control for Scaling WeChat Microservices\"*. We have followed the algorithm described in the paper to build this implementation.\n\nDAGOR is designed to manage overload in microservices by dynamically adjusting request admission levels based on both business and user priorities. It aims to maintain high throughput during overload situations by shedding excess load collaboratively across microservices.\n\n### Thread Safety\nIn the DAGOR implementation, we use Go's **`sync.Map`** for concurrent data access to shared resources and **atomic operations** for safely updating request counters, admission levels, and overload indicators. This ensures that the system can handle high-concurrency environments typical in microservice architectures without performance degradation due to locking contention.\n\n\n## Installation\n\nTo install the `dagor-grpc` package, run the following command:\n\n```bash\ngo get -u github.com/pennsail/dagor-grpc\n```\n\nEnsure that you have Go installed and your workspace is correctly configured.\n\n## Usage\n\n### Server Interceptor\n\nTo use `dagor` as a server interceptor, refer to the following example:\n\n```go\nimport (\n  \"github.com/pennsail/dagor-grpc/dagor\"\n  \"google.golang.org/grpc\"\n)\n\nfunc main() {\n  serverOptions := []grpc.ServerOption{\n    grpc.UnaryInterceptor(dagor.UnaryServerInterceptor),\n  }\n\n  server := grpc.NewServer(serverOptions...)\n  // Register services and start the server\n}\n```\n\n### Client Interceptor\n\nTo integrate `dagor` as a client interceptor, consult the following example:\n\n```go\nimport (\n  \"github.com/pennsail/dagor-grpc/dagor\"\n  \"google.golang.org/grpc\"\n)\n\nfunc main() {\n  clientOptions := []grpc.DialOption{\n    grpc.WithUnaryInterceptor(dagor.UnaryClientInterceptor),\n  }\n\n  conn, err := grpc.Dial(\"localhost:50051\", clientOptions...)\n  // Handle the connection and execute client logic\n}\n```\n\n## Contributing\n\nContributions from the community are welcome. For more information, please read the [contribution guidelines](CONTRIBUTING.md).\n\n## License\n\nThis project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details.\n```\n\nYou can place this content into your `README.md` file in the root directory of your repository. Feel free to adjust it according to your project's specific requirements.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpennsail%2Fdagor-grpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpennsail%2Fdagor-grpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpennsail%2Fdagor-grpc/lists"}