
Industrietaugliches C++ RPC-Framework zur Erstellung von Hochleistungsverteilten Systemen, das mehrere Protokolle unterstützt (HTTP, gRPC, Redis, Thrift) mit integriertem Lastausgleich, Namensdiensten und RAFT-Konsens.
[中文版](https://github.com/apache/brpc/blob/master/README_cn.md)
[](https://github.com/apache/brpc/actions/workflows/ci-linux.yml)
[](https://github.com/apache/brpc/actions/workflows/ci-macos.yml)


[bRPC](https://brpc.apache.org/) ist ein industrietaugliches RPC-Framework in der Programmiersprache C++, das häufig in Hochleistungssystemen wie Suche, Speicherung, maschinellem Lernen, Werbung, Empfehlungssystemen usw. eingesetzt wird.
### "bRPC" bedeutet "better RPC".
Sie können es verwenden, um:
* Einen Server zu erstellen, der in mehreren Protokollen kommunizieren kann (**auf demselben Port**), oder auf alle möglichen Dienste zuzugreifen:
* restful http/https, [h2](https://httpwg.org/specs/rfc9113.html)/[gRPC](https://grpc.io). Die Verwendung von http/h2 in bRPC ist deutlich benutzerfreundlicher als [libcurl](https://curl.haxx.se/libcurl/). Greifen Sie auf protobuf-basierte Protokolle mit HTTP/h2+json zu, wahrscheinlich aus einer anderen Sprache.
* [redis](https://github.com/apache/brpc/blob/master/docs/en/redis_client.md) und [memcached](https://github.com/apache/brpc/blob/master/docs/en/memcache_client.md), threadsicher, benutzerfreundlicher und leistungsfähiger als die offiziellen Clients.
* [rtmp](https://github.com/apache/brpc/blob/master/src/brpc/rtmp.h)/[flv](https://en.wikipedia.org/wiki/Flash_Video)/[hls](https://en.wikipedia.org/wiki/HTTP_Live_Streaming), zum Aufbau von [Streaming-Diensten](https://github.com/brpc/media-server).
* hadoop_rpc (möglicherweise Open Source).
* [rdma](https://en.wikipedia.org/wiki/Remote_direct_memory_access)-Unterstützung.
* [thrift](https://github.com/apache/brpc/blob/master/docs/en/thrift.md)-Unterstützung, threadsicher, benutzerfreundlicher und leistungsfähiger als die offiziellen Clients.
* alle möglichen Protokolle, die bei Baidu verwendet werden: [baidu_std](https://github.com/apache/brpc/blob/master/docs/en/baidu_std.md), [streaming_rpc](https://github.com/apache/brpc/blob/master/docs/en/streaming_rpc.md), hulu_pbrpc, [sofa_pbrpc](https://github.com/baidu/sofa-pbrpc), nova_pbrpc, public_pbrpc, ubrpc und nshead-basierte.
* Erstellen Sie verteilte [HA](https://en.wikipedia.org/wiki/High_availability)-Dienste mit einer industrietauglichen Implementierung des [RAFT-Konsensalgorithmus](https://raft.github.io), der als [braft](https://github.com/brpc/braft) Open Source ist.
* Server können Anfragen [synchron](https://github.com/apache/brpc/blob/master/docs/en/server.md) oder [asynchron](https://github.com/apache/brpc/blob/master/docs/en/server.md#asynchronous-service) verarbeiten.
* Clients können synchron, asynchron, halbsynchron auf Server zugreifen oder [Combo-Kanäle](https://github.com/apache/brpc/blob/master/docs/en/combo_channel.md) verwenden, um Sharding- oder parallele Zugriffe deklarativ zu vereinfachen.
* Dienste [über http](https://github.com/apache/brpc/blob/master/docs/en/builtin_service.md) debuggen und [CPU-](https://github.com/apache/brpc/blob/master/docs/en/cpu_profiler.md), [Heap-](https://github.com/apache/brpc/blob/master/docs/en/heap_profiler.md) und [Contention-](https://github.com/apache/brpc/blob/master/docs/en/contention_profiler.md)Profiler ausführen.
* [Bessere Latenz und höheren Durchsatz](https://github.com/apache/brpc/blob/master/docs/en/overview.md#better-latency-and-throughput) erzielen.
* [bRPC erweitern](https://github.com/apache/brpc/blob/master/docs/en/new_protocol.md) mit den in Ihrer Organisation verwendeten Protokollen, oder Komponenten anpassen, einschließlich [Naming-Services](https://github.com/apache/brpc/blob/master/docs/en/load_balancing.md) (dns, zk, etcd), [Load Balancer](https://github.com/apache/brpc/blob/master/docs/en/load_balancing.md) (rr, random, consistent hashing).
# Probieren Sie es aus!
* Lesen Sie [overview](https://github.com/apache/brpc/blob/master/docs/en/overview.md), um zu erfahren, wo bRPC eingesetzt werden kann und welche Vorteile es bietet.
* Lesen Sie [getting started](https://github.com/apache/brpc/blob/master/docs/en/getting_started.md) für die Build-Schritte und probieren Sie die [examples](https://github.com/apache/brpc/tree/master/example/) aus.
* Dokumentation:
* [FlatBuffers RPC aktivieren und das Beispiel überprüfen](https://github.com/apache/brpc/blob/master/docs/en/flatbuffers.md)
* [Performance-Benchmark](https://github.com/apache/brpc/blob/master/docs/en/benchmark.md)
* [bvar](https://github.com/apache/brpc/blob/master/docs/en/bvar.md)
* [bvar_c++](https://github.com/apache/brpc/blob/master/docs/en/bvar_c%2B%2B.md)
* [bthread](https://github.com/apache/brpc/blob/master/docs/en/bthread.md)
* [bthread oder nicht](https://github.com/apache/brpc/blob/master/docs/en/bthread_or_not.md)
* [thread-local](https://github.com/apache/brpc/blob/master/docs/en/thread_local.md)
* [Execution Queue](https://github.com/apache/brpc/blob/master/docs/en/execution_queue.md)
* [bthread tracer](https://github.com/apache/brpc/blob/master/docs/en/bthread_tracer.md)
* [bthread tagged task group](https://github.com/apache/brpc/blob/master/docs/en/bthread_tagged_task_group.md)
* Client
* [Grundlagen](https://github.com/apache/brpc/blob/master/docs/en/client.md)
* [Fehlercode](https://github.com/apache/brpc/blob/master/docs/en/error_code.md)
* [Combo-Kanäle](https://github.com/apache/brpc/blob/master/docs/en/combo_channel.md)
* [Zugriff auf http/h2](https://github.com/apache/brpc/blob/master/docs/en/http_client.md)
* [Zugriff auf gRPC](https://github.com/apache/brpc/blob/master/docs/en/http_derivatives.md#h2grpc)
* [Zugriff auf thrift](https://github.com/apache/brpc/blob/master/docs/en/thrift.md#client-accesses-thrift-server)
* [Zugriff auf UB](https://github.com/apache/brpc/blob/master/docs/en/ub_client.md)
* [Streaming RPC](https://github.com/apache/brpc/blob/master/docs/en/streaming_rpc.md)
* [Zugriff auf redis](https://github.com/apache/brpc/blob/master/docs/en/redis_client.md)
* [Zugriff auf memcached](https://github.com/apache/brpc/blob/master/docs/en/memcache_client.md)
* [Backup-Anfrage](https://github.com/apache/brpc/blob/master/docs/en/backup_request.md)
* [Dummy-Server](https://github.com/apache/brpc/blob/master/docs/en/dummy_server.md)
* Server
* [Grundlagen](https://github.com/apache/brpc/blob/master/docs/en/server.md)
* [http/h2 bereitstellen](https://github.com/apache/brpc/blob/master/docs/en/http_service.md)
* [gRPC bereitstellen](https://github.com/apache/brpc/blob/master/docs/en/http_derivatives.md#h2grpc)
* [thrift bereitstellen](https://github.com/apache/brpc/blob/master/docs/en/thrift.md#server-processes-thrift-requests)
* [Nshead bereitstellen](https://github.com/apache/brpc/blob/master/docs/en/nshead_service.md)
* [Serverprobleme debuggen](https://github.com/apache/brpc/blob/master/docs/en/server_debugging.md)
* [Server-Push](https://github.com/apache/brpc/blob/master/docs/en/server_push.md)
* [Avalanche](https://github.com/apache/brpc/blob/master/docs/en/avalanche.md)
* [Automatischer ConcurrencyLimiter](https://github.com/apache/brpc/blob/master/docs/en/auto_concurrency_limiter.md)
* [Media Server](https://github.com/brpc/media-server)
* [json2pb](https://github.com/apache/brpc/blob/master/docs/en/json2pb.md)
* [Integrierte Dienste](https://github.com/apache/brpc/blob/master/docs/en/builtin_service.md)
* [status](https://github.com/apache/brpc/blob/master/docs/en/status.md)
* [vars](https://github.com/apache/brpc/blob/master/docs/en/vars.md)
* [connections](https://github.com/apache/brpc/blob/master/docs/en/connections.md)
* [flags](https://github.com/apache/brpc/blob/master/docs/en/flags.md)
* [rpcz](https://github.com/apache/brpc/blob/master/docs/en/rpcz.md)
* [cpu_profiler](https://github.com/apache/brpc/blob/master/docs/en/cpu_profiler.md)
* [heap_profiler](https://github.com/apache/brpc/blob/master/docs/en/heap_profiler.md)
* [contention_profiler](https://github.com/apache/brpc/blob/master/docs/en/contention_profiler.md)
* Werkzeuge
* [rpc_press](https://github.com/apache/brpc/blob/master/docs/en/rpc_press.md)
* [rpc_replay](https://github.com/apache/brpc/blob/master/docs/en/rpc_replay.md)
* [rpc_view](https://github.com/apache/brpc/blob/master/docs/en/rpc_view.md)
* [benchmark_http](https://github.com/apache/brpc/blob/master/docs/en/benchmark_http.md)
* [parallel_http](https://github.com/apache/brpc/blob/master/docs/en/parallel_http.md)
* Sonstiges
* [IOBuf](https://github.com/apache/brpc/blob/master/docs/en/iobuf.md)
* [Streaming Log](https://github.com/apache/brpc/blob/master/docs/en/streaming_log.md)
* [FlatMap](https://github.com/apache/brpc/blob/master/docs/en/flatmap.md)
* [Coroutine](https://github.com/apache/brpc/blob/master/docs/en/coroutine.md)
* [Circuit Breaker](https://github.com/apache/brpc/blob/master/docs/en/circuit_breaker.md)
* [UBRing](https://github.com/apache/brpc/blob/master/docs/en/ubring.md)
* [RDMA](https://github.com/apache/brpc/blob/master/docs/en/rdma.md)
* [Bazel-Unterstützung](https://github.com/apache/brpc/blob/master/docs/en/bazel_support.md)
* [Wireshark baidu_std Dissector-Plugin](https://github.com/apache/brpc/blob/master/docs/en/wireshark_baidu_std.md)
* [bRPC-Einführung](https://github.com/apache/brpc/blob/master/docs/cn/brpc_intro.pptx)(Schulungsmaterial)
* [Ein Tutorial zum Aufbau großer Dienste](https://github.com/apache/brpc/blob/master/docs/en/tutorial_on_building_services.pptx)(Schulungsmaterial)
* [bRPC intern](https://github.com/apache/brpc/blob/master/docs/en/brpc_internal.pptx)(Schulungsmaterial)
* RPC im Detail
* [Neues Protokoll](https://github.com/apache/brpc/blob/master/docs/en/new_protocol.md)
* [Atomare Instruktionen](https://github.com/apache/brpc/blob/master/docs/en/atomic_instructions.md)
* [IO](https://github.com/apache/brpc/blob/master/docs/en/io.md)
* [Threading-Überblick](https://github.com/apache/brpc/blob/master/docs/en/threading_overview.md)
* [Lastverteilung](https://github.com/apache/brpc/blob/master/docs/en/load_balancing.md)
* [Locality-aware](https://github.com/apache/brpc/blob/master/docs/en/lalb.md)
* [Consistent Hashing](https://github.com/apache/brpc/blob/master/docs/en/consistent_hashing.md)
* [Speicherverwaltung](https://github.com/apache/brpc/blob/master/docs/en/memory_management.md)
* [Timer-Verwaltung](https://github.com/apache/brpc/blob/master/docs/en/timer_keeping.md)
* [bthread_id](https://github.com/apache/brpc/blob/master/docs/en/bthread_id.md)
* Anwendungsfälle
* [Anwendungsfälle](https://github.com/apache/brpc/blob/master/community/cases.md)
# Code beitragen
Bitte lesen Sie [hier](https://github.com/apache/brpc/blob/master/CONTRIBUTING.md).
# Feedback und Mitwirkung
* Melden Sie Fehler, stellen Sie Fragen oder geben Sie Anregungen über [Github Issues](https://github.com/apache/brpc/issues).
* Abonnieren Sie die Mailingliste ([email protected]), um über Neuigkeiten zum Projekt informiert zu bleiben.
# Verhaltenskodex
Wir folgen dem Verhaltenskodex der Apache Software Foundation, bitte beachten Sie ihn hier [Link](https://www.apache.org/foundation/policies/conduct).