{"id":13489684,"url":"https://github.com/aeraki-mesh/meta-protocol-proxy","last_synced_at":"2026-02-10T00:08:53.861Z","repository":{"id":38012890,"uuid":"387326109","full_name":"aeraki-mesh/meta-protocol-proxy","owner":"aeraki-mesh","description":"A data plane framework that supports any layer-7 protocols.","archived":false,"fork":false,"pushed_at":"2023-12-17T04:25:34.000Z","size":1228,"stargazers_count":79,"open_issues_count":23,"forks_count":29,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-31T03:34:03.265Z","etag":null,"topics":["envoyproxy","istio","service-mesh"],"latest_commit_sha":null,"homepage":"","language":"C++","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/aeraki-mesh.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}},"created_at":"2021-07-19T03:19:07.000Z","updated_at":"2024-05-15T09:32:18.000Z","dependencies_parsed_at":"2024-01-16T09:01:13.984Z","dependency_job_id":"3cc26f8e-ebfd-4e1e-8824-37d40dbfb43f","html_url":"https://github.com/aeraki-mesh/meta-protocol-proxy","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeraki-mesh%2Fmeta-protocol-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeraki-mesh%2Fmeta-protocol-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeraki-mesh%2Fmeta-protocol-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeraki-mesh%2Fmeta-protocol-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aeraki-mesh","download_url":"https://codeload.github.com/aeraki-mesh/meta-protocol-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245978200,"owners_count":20703675,"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":["envoyproxy","istio","service-mesh"],"created_at":"2024-07-31T19:00:33.244Z","updated_at":"2026-02-10T00:08:53.816Z","avatar_url":"https://github.com/aeraki-mesh.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"[中文](README_ZH.md)\n\n# meta-protocol-proxy\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Faeraki-mesh%2Fmeta-protocol-proxy.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Faeraki-mesh%2Fmeta-protocol-proxy?ref=badge_shield)\n\n\n## Why MetaProtocol is needed?\n\nAlmost all open source and commercial Service Meshes currently support only two Layer-7 protocols - HTTP and gRPC. \nOther widely used protocols in microservices, including Dubbo, Thrift, Redis, MySql, etc. can only be handled as plain TCP traffic \n, hence advanced traffic management capabilities promised by Service Mesh are not available for those protocols. In addition, \nsome microservices are using proprietary RPC protocols for inter-service communication, we need to manage these protocols as well.\n\nAs shown in the figure below, we usually have these layer-7 protocols in a typical microservice application\n\n* RPC： HTTP、gRPC、Dubbo、Thrift、proprietary RPC ...\n* Async Message：Kafka, RabbitMQ ...\n* DB：mySQL, PostgreSQL, MongoDB ...\n![](docs/image/microservices-l7-protocols.png)\n\n## What MetaProtocol provides?\n\nMetaProtocol is aimed to support any layer-7 protocols in Service Mesh. \n* Data plane：MetaProtocol Proxy provides common capabilities for Layer-7 protocols, such as load balancing, circuit breaker, load balancing, routing, rate limiting, fault injection, and auth.\n  ![](docs/image/meta-protocol-proxy.png)\n* Control plane：[Aeraki](https://github.com/aeraki-framework/aeraki) provides a centralized control plane for MetaProtocol Proxy. \n  Aeraki sends the configuration and dynamic routing rules to the MetaProtocol Proxies in the data plane. It also has high-level CRDs to \n  provide a user-friendly interface to operation teams. Advanced traffic management such as traffic splitting, canary deployment, traffic mirroring, and RBAC can be achieved by these CRDs.\n  ![](docs/image/aeraki-meta-protocol.png)\n\nTo add a new protocol into the service mesh, the only thing you need to do is implementing the [codec interface](src/meta_protocol_proxy/codec/codec.h#L118).\n\nIf you have special requirements which can't be meet by the built-in capabilities, MetaProtocol Proxy also has a filter chain mechanism, \nallowing users to write their own layer-7 filters to add custom logic into MetaProtocol Proxy.\n\n## Build MetaProtocol Proxy\n\nFollow this guide [Building Envoy with Bazel](https://github.com/envoyproxy/envoy/blob/main/bazel/README.md) to install the required software.\n\nBelow is how to build on Ubuntu 18.04\n\n### Install Bazelisk as Bazel\n\nIt is recommended to use Bazelisk installed as bazel, to avoid Bazel compatibility issues.\n\n```bash\nsudo wget -O /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-$([ $(uname -m) = \"aarch64\" ] \u0026\u0026 echo \"arm64\" || echo \"amd64\")\nsudo chmod +x /usr/local/bin/bazel\n```\n\n### Install external dependencies\n\n```bash\nsudo apt-get install autoconf automake cmake curl libtool make ninja-build patch python3-pip unzip virtualenv libc++-10-dev\n```\n\n### Install LLVM\nx86\n```bash\ncd /home/ubuntu \\\n  \u0026\u0026 wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz \\\n  \u0026\u0026 mkdir clang+llvm-10.0.0-linux-gnu \\\n  \u0026\u0026 tar -xvf clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz -C clang+llvm-10.0.0-linux-gnu --strip-components 1 \\\n  \u0026\u0026 rm clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz\n```\n\narm\n```bash\ncd /home/ubuntu \\\n  \u0026\u0026 wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-aarch64-linux-gnu.tar.xz \\\n  \u0026\u0026 mkdir clang+llvm-10.0.0-linux-gnu \\\n  \u0026\u0026 tar -xvf clang+llvm-10.0.0-aarch64-linux-gnu.tar.xz -C clang+llvm-10.0.0-linux-gnu --strip-components 1 \\\n  \u0026\u0026 rm clang+llvm-10.0.0-aarch64-linux-gnu.tar.xz\n```\n\n### Setup clang\n\n```bash\n./bazel/setup_clang.sh /home/ubuntu/clang+llvm-10.0.0-linux-gnu\n```\n\n### Build\nRun  ```make build```, if the build completes successfully, the generated binary will be at ```bazel-bin/envoy```, which contains \nthe MetaProtocol Proxy and the codecs of the application protocols.\n\nTo build MetaProtocol proxy for production, run ```make release```.\n\n### How to solve \"No space left on device error\" ?\n\nBazel generates a lot of small files while building, which often causes running out of inodes.\n\nYou can use XFS instead of Ext4 file system to avoid this issue because XFS uses 64-bit structure, which can have 2^64 inodes, much more than Ext4's 32-bit structure.\n\n## Build MetaProtocol Proxy Using Docker\nnow support x86 and arm\n### Export meta-protocol-proxy repo path\n\n```bash\nexport META_PROTOCOL_PROXY_REPO=/path/to/meta-protocol-proxy\n```\n\n### Start the build container\n\n```bash\ndocker run -it --name meta-protocol-proxy-build -v ${META_PROTOCOL_PROXY_REPO}:/meta-protocol-proxy aeraki/meta-protocol-proxy-build:2022-0429-0 bash\n```\n\n### Build\n```bash\ncd /meta-protocol-proxy\nmake build\n```\n\n## Test MetaProtocol Proxy\n\nTwo layer-7 protocols, [Dubbo](src/application_protocols/dubbo) and [Thrift](src/application_protocols/thrift\n), have been implemented based on MetaProtocol. More protocols are under development.\n\n### Dubbo\nSince the dubbo test client will use dns name ```org.apache.dubbo.samples.basic.api.demoservice``` to access th dubbo test server, we need to\nadd the below line to the hosts file:\n\n```bash\n127.0.0.1 org.apache.dubbo.samples.basic.api.demoservice\n```\n\nRun ```./test/dubbo/test.sh ```, this script will run the envoy, dubbo test client and dubbo test server。You'll expect to see the below output:\n\n```bash\nHello Aeraki, response from ed9006021490/172.17.0.2\nHello Aeraki, response from ed9006021490/172.17.0.2\nHello Aeraki, response from ed9006021490/172.17.0.2\n```\n\nThis output means that the dubbo test client has successful reached the dubbo test server through envoy MetaProtocol proxy. \nTo understand how it works, you can look into [test/dubbo/test.yaml](test/dubbo/test.yaml) and play with the MetaProtocol configuration.\n\n### Thrift\n\nRun ```./test/thrift/test.sh ```, this script will run the envoy, thrift test client and thrift test server。You'll expect to see the below output:\n\n```bash\nHello Aeraki, response from ae6582f53868/172.17.0.2\nHello Aeraki, response from ae6582f53868/172.17.0.2\nHello Aeraki, response from ae6582f53868/172.17.0.2\n```\n\nThis output means that the thrift test client has successfully reached the thrift test server through envoy MetaProtocol proxy. \nTo understand how it works, you can look into [test/thrift/test.yaml](test/thrift/test.yaml) and play with the MetaProtocol configuration. \n\n### RDS\n\nMetaProtocol framework implements RDS discovery protocol, which means the route configuration can be fetched from a RDS server on the fly. MetaProtocol Proxy will apply the updated routes to all the subsequent requests, and\nthe existing connections won't be interrupted in this process.\n\nRun ```./test/rds/test.sh ```, this script will run the envoy, an example rds server, dubbo test client and thrift test server。You'll expect to see the below output:\n\n```bash\nHello Aeraki, response from 400c8a27e761/172.17.0.2\nHello Aeraki, response from 400c8a27e761/172.17.0.2\nHello Aeraki, response from 400c8a27e761/172.17.0.2\n```\n\nThis output means that the dubbo test client has successfully reached the dubbo test server through envoy MetaProtocol proxy, with the route configuration fetched from the RDS server.\nTo understand how it works, you can look into [test/rds/test.yaml](test/rds/test.yaml) and play with the MetaProtocol configuration. \n\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Faeraki-mesh%2Fmeta-protocol-proxy.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Faeraki-mesh%2Fmeta-protocol-proxy?ref=badge_large)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeraki-mesh%2Fmeta-protocol-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faeraki-mesh%2Fmeta-protocol-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeraki-mesh%2Fmeta-protocol-proxy/lists"}