Industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances and thousands kinds of services. "brpc" means "better RPC".

Overview

中文版

Build Status

brpc

An industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances(not counting clients) and thousands kinds of services. "brpc" means "better RPC".

You can use it to:

Try it!

Contribute code

Please refer to here.

Feedback and Getting involved

Comments
  • 1.0.0 庆祝发版并感谢贡献者活动

    1.0.0 庆祝发版并感谢贡献者活动

    为庆祝 Apache brpc 发版 1.0.0 同时向 brpc 贡献者表示感谢,Apache brpc 社区邀请百度 OSPO 马红伟赞助制作小型文化礼品,礼品带有brpc logo和committer/contributor身份标志,以此答谢他们对项目做出的贡献。

    同时公布“good first issue”一个 https://github.com/apache/incubator-brpc/issues/1640 鼓励brpc的用户贡献brpc在各自公司的落地场景信息来完善brpc的应用生态信息,并可以成为新的贡献者。

    参加活动的将获得如下奖品: 钥匙扣一个

    贡献者需要在此跟帖,附上自己的信息。

    格式如下: github id: XXX brpc 贡献url:https://github.com/apache/incubator-brpc/commits?author=XXX

    并在问卷中 https://wj.qq.com/s2/9529773/dd28/ 填上自己的姓名/手机/邮寄地址,便于邮寄 github id: XXX 姓名:XXX 手机:123456789 邮寄地址:xx省xx市XX县xx小区xxx

    opened by tanzhongyi003 46
  • Chore: rework Bazel build system

    Chore: rework Bazel build system

    Totally rewrite the bazel build support.

    1. Support latest version of bazel.

    2. Build all external dependencies (except for mesalink) with bazel.

    3. Support Protobuf 3.19.1 (breaking changes here: https://github.com/protocolbuffers/protobuf/commit/624d29d83306f3ce2c7e092dd44a891e04215e67) image

    4. Support generate compile_commands.json for bazel project.

    5. Rework the options flags & move all of them into //bazel/config

    Leave building with mesalink for future. I think maybe all dependencies should link against mesalink instead of openssl.

    enhancement feature 
    opened by hcoona 38
  • macos (Apple M1 )编译过程报错

    macos (Apple M1 )编译过程报错

    macos (Apple M1 )编译过程报错 incubator-brpc/src/butil/time.h:223:11: error: invalid output constraint '=a' in asm : "=a" (lo), "=d" (hi) 请大佬们修复一下

    opened by roczpwu 34
  • http2 / grpc问题

    http2 / grpc问题

    Describe the bug (描述bug) [E2004]remote_window_left is not enough, data_size=629370 [R1][E2004]remote_window_left is not enough, data_size=629370 W0403 10:03:43.719316 12510 http2_rpc_protocol.cpp:206] Unknown setting, id=65027 value=1

    To Reproduce (复现方法) http2 client连 grpc服务端,传输大小600KB

    Expected behavior (期望行为)

    Versions (各种版本) OS: centos 7 Compiler: gcc4.8 brpc: 0.9.5 protobuf: 3.5

    Additional context/screenshots (更多上下文/截图)

    传输数据大了,该怎么改?

    opened by yjhjstz 27
  • 在brpc接口内部core,但是使用gdb分析时遇到问题

    在brpc接口内部core,但是使用gdb分析时遇到问题

    #include <string>
    std::stof("a");
    

    在brpc接口内部使用该方法,导致服务core。通过分析core有办法能直接定位到哪一行出现的问题吗?

    使用gdb打开core文件,bt后得到下面的信息:

    (gdb) bt
    #0  0x00007f98eb2b11f7 in raise () from /lib64/libc.so.6
    #1  0x00007f98eb2b28e8 in abort () from /lib64/libc.so.6
    #2  0x0000000000a7a6b5 in __gnu_cxx::__verbose_terminate_handler() ()
    #3  0x0000000000a23406 in __cxxabiv1::__terminate(void (*)()) ()
    #4  0x0000000000a7a159 in __cxa_call_terminate ()
    #5  0x0000000000a232f4 in __gxx_personality_v0 ()
    #6  0x0000000000a7eeb3 in _Unwind_RaiseException_Phase2 ()
    #7  0x0000000000a7f6a7 in _Unwind_Resume ()
    #8  0x00000000007bdd2a in operator() (this=<optimized out>, obj=<optimized out>) at ./src/brpc/destroyable.h:33
    #9  ~unique_ptr (this=<synthetic pointer>, __in_chrg=<optimized out>) at /usr/include/c++/4.8.2/bits/unique_ptr.h:184
    #10 ~DestroyingPtr (this=<synthetic pointer>, __in_chrg=<optimized out>) at ./src/brpc/destroyable.h:39
    #11 brpc::policy::ProcessRpcRequest (msg_base=<optimized out>) at src/brpc/policy/baidu_rpc_protocol.cpp:508
    #12 0x00000000008df7fa in brpc::ProcessInputMessage ([email protected]=0x7f98a8021930) at src/brpc/input_messenger.cpp:132
    #13 0x00000000008e07e4 in operator() (this=<optimized out>, last_msg=0x7f98a8021930) at src/brpc/input_messenger.cpp:138
    #14 brpc::InputMessenger::OnNewMessages (m=0x7f987401ac80) at /usr/include/c++/4.8.2/bits/unique_ptr.h:184
    #15 0x00000000008d04ed in brpc::Socket::ProcessEvent (arg=0x7f987401ac80) at src/brpc/socket.cpp:1049
    #16 0x000000000071c1f4 in bthread::TaskGroup::task_runner (skip_remained=<optimized out>) at src/bthread/task_group.cpp:291
    #17 0x0000000000834791 in bthread_make_fcontext ()
    #18 0x0000000000000000 in ?? ()
    

     

    wontfix 
    opened by adanteng 25
  • fix rpc_press can't send request equably

    fix rpc_press can't send request equably

    项目中利用rpc_press进行压测,出现服务衰减问题,即压测过程中服务性能越变越差。后来通过分析发现rpc_press压测工具的实现存在问题,网络或者CPU抖动造成的发送请求不均匀会一直保存在窗口中,并影响后续请求,随程序运行时间变长,抖动出现的次数越来越多,发送地请求会越来越不均匀。具体分析如下:

    举例说明:假设 QPS: 100,异步发送请求平均耗时 1ms,为方便画图,假设队列最大长度为10。

    图(1) 中发送编号为4的请求时CPU或者网络抖动,造成本应在t+31发出的请求滞后了15ms,按照代码逻辑,编号为5/6的请求分别在t + 47 和 t + 51发出

    图(2) 我们假设队列最大长度为10,按照图上的计算过程可以得到,发送完请求14后会sleep 24ms,这样就导致发送请求4时的抖动,对请求15发送时间造成了影响,抖动会在队列中一直存在。QPS越高,请求间隔越短,这个问题越容易出现。 image 本pull request利用一种更简单的方式来计算请求间隔,来解决上述问题。

    opened by bumingchun 23
  • fix ssl state exception coredump

    fix ssl state exception coredump

    fix https://github.com/apache/incubator-brpc/issues/658

    coredump case的场景:当上游Controller::IssueRPC选出节点后、Socket::Write KEEPWRITE_IN_BACKGROUND前,下游退出了,上游在OnNewMwssage中读到EOF,将Socket SetFailed,并启动了HealthCheckThread。此时,socket的引用计数为3(Controller::IssueRPC、HealthCheckThread、SocketMap),HealthCheckThread在WaitAndRest等引用计数变成2(预期是HealthCheckThread、SocketMap)。然后,NamingService将该下游节点摘掉,并将对应socket从SocketMap中删除,引用计数减一,变成2。HealthCheckThread在WaitAndRest中将_ssl_state置为SSL_UNKONW。最后,上游Controller::IssueRPC走到Socket::KeepWrite。虽然client未开启ssl,但是HealthCheckTask将_ssl_state置为SSL_UNKONW了,所以程序会运行到写ssl(空指针)的逻辑,最终导致coredump。

    解决方案:设置flag标识是否停止health check thread。当SocketMap删除socket时,先将flag置为true,再释放引用计数。HealthCheckThread中Wait到2之后,判断改flag是否为true。是,则直接返回,退出health check thread。否则,继续进行health check。

    opened by chenBright 20
  • 上线brpc之后,集群同一个时刻访问下游服务出现集体超时现象

    上线brpc之后,集群同一个时刻访问下游服务出现集体超时现象

    Describe the bug (描述bug)

    上线brpc之后,集群偶尔会出现(一天出现)同一个时刻访问下游服务出现集体超时现象,同一时刻网卡出入流量掉一个大坑,整个过程1分钟之内可以自动恢复,同时也发现访问下游服务rpc调用耗时远远超出设置的timeout,甚至出现访问某些下游出现20s的现象,整个过程cpu远远没有达到瓶颈,排查过业务代码,业务代码只有一个地方用到锁,同时也没有除了rpc其他外部服务的流程。问下造成这种想象的原因可能是啥?谢谢

    To Reproduce (复现方法) 暂时找不到很好的复现方法!

    Expected behavior (期望行为)

    Versions (各种版本) OS:centos7.4 Compiler:gcc5.2 brpc:release1.0 protobuf:2.5

    Additional context/screenshots (更多上下文/截图)

    wontfix 
    opened by scottzzq 20
  • Memory not registered for rdma. Is this iobuf allocated before calling GlobalRdmaInitializeOrDie? Or just forget to call RegisterMemoryForRdma for your own buffer?

    Memory not registered for rdma. Is this iobuf allocated before calling GlobalRdmaInitializeOrDie? Or just forget to call RegisterMemoryForRdma for your own buffer?

    Describe the bug (描述bug) IOBuf cannot append_user_data with address starts after RegisterMemoryForRdma

    W20221115 18:15:32.455838 79345 rdma_endpoint.cpp:727] Memory not registered for rdma. Is this iobuf allocated before calling GlobalRdmaInitializeOrDie? Or just forget to call RegisterMemoryForRdma for your own buffer?                                                                                                                                
    W20221115 18:15:32.455842 79345 socket.cpp:1705] Fail to keep-write into Socket{id=2 fd=1034 addr=0.0.0.0:8002:53496} (0x55b33af574d0): Unknown error 3002 [3002]
    E20221115 18:15:32.455933 79247 server2.cpp:95] RPC call failed: [E3002]Fail to keep-write into Socket{id=2 fd=1034 addr=0.0.0.0:8002:53496} (0x0x55b33af574d0): Memory not registered for RDMA
    

    To Reproduce (复现方法)

    // Licensed to the Apache Software Foundation (ASF) under one
    // or more contributor license agreements.  See the NOTICE file
    // distributed with this work for additional information
    // regarding copyright ownership.  The ASF licenses this file
    // to you under the Apache License, Version 2.0 (the
    // "License"); you may not use this file except in compliance
    // with the License.  You may obtain a copy of the License at
    //
    //   http://www.apache.org/licenses/LICENSE-2.0
    //
    // Unless required by applicable law or agreed to in writing,
    // software distributed under the License is distributed on an
    // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    // KIND, either express or implied.  See the License for the
    // specific language governing permissions and limitations
    // under the License.
    
    #include <gflags/gflags.h>
    #include "butil/atomicops.h"
    #include "butil/logging.h"
    #include "butil/time.h"
    #include "brpc/channel.h"
    #include "brpc/rdma/rdma_helper.h"
    #include "brpc/server.h"
    #include "bvar/variable.h"
    #include "test.pb.h"
    
    DEFINE_int32(port, 8002, "TCP Port of this server");
    DEFINE_bool(use_rdma, true, "Use RDMA or not");
    namespace brpc{
    namespace rdma {
        DECLARE_bool(rdma_trace_verbose);
    }
    }  // namespace brpc
    
    butil::atomic<uint64_t> g_last_time(0);
    
    namespace test {
    class PerfTestServiceImpl : public PerfTestService {
    public:
        PerfTestServiceImpl() {}
        ~PerfTestServiceImpl() {};
    
        void Test(google::protobuf::RpcController* cntl_base,
                  const PerfTestRequest* request,
                  PerfTestResponse* response,
                  google::protobuf::Closure* done) {
            brpc::ClosureGuard done_guard(done);
            uint64_t last = g_last_time.load(butil::memory_order_relaxed);
            uint64_t now = butil::monotonic_time_us();
            if (now > last && now - last > 100000) {
                if (g_last_time.exchange(now, butil::memory_order_relaxed) == last) {
                    response->set_cpu_usage(bvar::Variable::describe_exposed("process_cpu_usage"));
                } else {
                    response->set_cpu_usage("");
                }
            } else {
                response->set_cpu_usage("");
            }
            brpc::Controller* cntl = static_cast<brpc::Controller*>(cntl_base);
            if (request->echo_attachment()) {
                cntl->response_attachment().append(cntl->request_attachment());
            }
            if (!cntl->request_attachment().empty()) {
              std::string tmp;
              cntl->request_attachment().cutn(&tmp, 5);
              LOG(INFO) << tmp;
            }
            
        }
    };
    }
    
    void run_client() {
      brpc::rdma::GlobalRdmaInitializeOrDie();
      brpc::ChannelOptions options;
      options.use_rdma = FLAGS_use_rdma;
      options.protocol = "baidu_std";
      options.connection_type = "single";
      options.timeout_ms = 10000;
      options.max_retry = 0;
      std::string server = "0.0.0.0:8002";
      brpc::Channel* _channel = new brpc::Channel();
      if (_channel->Init(server.c_str(), &options) != 0) {
        LOG(ERROR) << "Fail to initialize channel";
        return;
      }
      brpc::Controller cntl;
      test::PerfTestResponse response;
      test::PerfTestRequest request;
      char buffer[16] = {'a', 'b', 'c'};
      brpc::rdma::RegisterMemoryForRdma(buffer, 16);
      cntl.request_attachment().append_user_data(buffer + 1, 3, [](void*) {});
      request.set_echo_attachment(false);
      test::PerfTestService_Stub stub(_channel);
      stub.Test(&cntl, &request, &response, NULL);
      if (cntl.Failed()) {
        LOG(ERROR) << "RPC call failed: " << cntl.ErrorText();
      } else {
        LOG(INFO) << "RPC call success";
      }
    
    }
    
    int main(int argc, char* argv[]) {
        brpc::rdma::fLB::FLAGS_rdma_trace_verbose = true;
        GFLAGS_NS::ParseCommandLineFlags(&argc, &argv, true);
        if (FLAGS_use_rdma) {
            LOG(INFO) << "Call GlobalRdmaInitializeOrDie";
            brpc::rdma::GlobalRdmaInitializeOrDie();
        }
    
        brpc::Server server;
        test::PerfTestServiceImpl perf_test_service_impl;
    
        if (server.AddService(&perf_test_service_impl, 
                              brpc::SERVER_DOESNT_OWN_SERVICE) != 0) {
            LOG(ERROR) << "Fail to add service";
            return -1;
        }
        g_last_time.store(0, butil::memory_order_relaxed);
    
        brpc::ServerOptions options;
        options.use_rdma = FLAGS_use_rdma;
        if (server.Start(FLAGS_port, &options) != 0) {
            LOG(ERROR) << "Fail to start EchoServer";
            return -1;
        }
        run_client();
    
        server.RunUntilAskedToQuit();
        return 0;
    }
    
    

    Expected behavior (期望行为) IOBuf can append_user_data with data in RegisterMemoryForRdma

    Versions (各种版本) OS: Ubuntu 22.04 Compiler: GCC 11.2.0 brpc: 3d90221107000133c2d7f3ccc6372680fb6af27d protobuf:

    Additional context/screenshots (更多上下文/截图)

    bug 
    opened by 372046933 19
  • 【编译报错】

    【编译报错】

    Describe the bug (描述bug)

    image

    To Reproduce (复现方法) git clone https://github.com/apache/incubator-brpc.git git checkout -b release-1.1 origin/release-1.1

    Expected behavior (期望行为) make success

    Versions (各种版本) OS: WSL Ubuntu18.04 Compiler: gcc 7.5 g++7.5 image

    brpc: release1.1 protobuf: 3.8.0 image

    Additional context/screenshots (更多上下文/截图) Makefile 的CXXFlags中增加了-D_GLIBCXX_USE_CXX11_ABI=0参数. image

    gflgas 手工编译

    kind/compile 
    opened by willamhou 19
  • 客户端出现大量timeout

    客户端出现大量timeout

    search() leaf error:host:.bj,port:8104,brpc status code:1008,brpc error message:[E1008]Reached timeout=3000ms @:8104,query:穿越时空之妃不能忍 timecost:3001 latency:3001291

    大部分的请求都是正常,但是会会出现很多的timeout 错误,但是此query,在服务器端的耗时确实正常,只有几十毫秒.

    使用的单连接,baidu_std协议.设置了3秒的超时时间.

    感觉消息阻塞在网络或者框架上了,请问怎么排查此类问题,有没有可能单连接的各种缓冲区满了,导致阻塞等???

    opened by cuisonghui 19
  • 多维度bvar支持http内置服务查看吗?

    多维度bvar支持http内置服务查看吗?

    github里多维度bvar文档里说支持 image 我在example中的echo示例中用了多维度bvar,但是在/brpc_metrics中并没有看到request_countabcd的统计数据。 我又在https://brpc.apache.org/zh/docs/bvar/mbvar-c++/ 里看到说多维度bvar目前不支持http内置服务查询,所以到底支持还是不支持?还是只能在代码里通过describe等函数查到? image

    namespace metric {
        bvar::MultiDimension<bvar::Adder<int>> g_request_count("request_countabcd", {"idc", "method", "status"});
        int process_request(const std::list<std::string>& request_label) {
            // 获取request_label对应的单维度bvar指针,比如:request_label = {"tc", "get", "200"}
            bvar::Adder<int>* adder = g_request_count.get_stats(request_label);
            // 判断指针非空
            if (!adder) {
                LOG(ERROR) << "request no bvar"; // adder add up to 6
                return -1;
            }
            // adder只能在g_request_count的生命周期内访问,否则行为未定义,可能会出core
            // 给adder输入一些值
            *adder << 1 << 2 <<3;
            LOG(INFO) << "request adder=" << *adder; // adder add up to 6
            return 0;
        }
    } // metric
    namespace example {
    class EchoServiceImpl : public EchoService {
    public:
        EchoServiceImpl() {}
        virtual ~EchoServiceImpl() {}
        virtual void Echo(google::protobuf::RpcController* cntl_base,
                          const EchoRequest* request,
                          EchoResponse* response,
                          google::protobuf::Closure* done) {
            // This object helps you to call done->Run() in RAII style. If you need
            // to process the request asynchronously, pass done_guard.release().
            brpc::ClosureGuard done_guard(done);
    
            brpc::Controller* cntl =
                static_cast<brpc::Controller*>(cntl_base);
    
            // The purpose of following logs is to help you to understand
            // how clients interact with servers more intuitively. You should 
            // remove these logs in performance-sensitive servers.
            LOG(INFO) << "Received request[log_id=" << cntl->log_id() 
                      << "] from " << cntl->remote_side() 
                      << " to " << cntl->local_side()
                      << ": " << request->message()
                      << " (attached=" << cntl->request_attachment() << ")";
    
            // Fill response.
            response->set_message(request->message());
    
            metric::process_request({"lf","echo","success"});
            // You can compress the response by setting Controller, but be aware
            // that compression may be costly, evaluate before turning on.
            // cntl->set_response_compress_type(brpc::COMPRESS_TYPE_GZIP);
    
            if (FLAGS_echo_attachment) {
                // Set attachment which is wired to network directly instead of
                // being serialized into protobuf messages.
                cntl->response_attachment().append(cntl->request_attachment());
            }
        }
    };
    }  // namespace example
    
    opened by 17336 2
  • Pb2JsonOptions的注释与实际相反

    Pb2JsonOptions的注释与实际相反

    Describe the bug (描述bug)

    1、single_repeated_to_array字段的注释中,default是false。
    2、但是实际使用时发现,默认是开启的。例如
    "my_field": ["value1"], my_field是一个repeated字段,没有设置single_repeated_to_array的情况下,仍然解析为array
    

    截屏2022-12-22 19 00 22

    To Reproduce (复现方法)

    Expected behavior (期望行为)

    Versions (各种版本) OS:centos7和6 Compiler:gcc7.3 brpc:1.3 protobuf:2.4.1

    Additional context/screenshots (更多上下文/截图)

    usage 
    opened by mrwhyxxk 1
  • 传输大量数据必须用butil::IOBuf 吗?

    传输大量数据必须用butil::IOBuf 吗?

    每个 chunk 的 size 在 100KB ~ 100MB 之间,chunk 先序列化成 protobuf chunkPB。 Q1: chunkPB 有必要 copy 到 butil::IOBuf 中通过 attachment 传输吗?还是直接传输 chunkPB 结构?这两种方式哪种更高效? (我理解两种方式都可以,直接传输chunkPB 更高效)

    Q2:调用 rpc,发送端和接受端的 chunkPB 的生命周期? chunk_rpc(chunkPB,closure) 这样的接口,在发送端,发送完之后,chunkPB 的内存是否可以释放?接受端的 chunkPB 是不是在 closure 调用之前都有效?

    opened by fzhedu 2
  • Keep bthread TaskGroup abi compatible with NDEBUG macro

    Keep bthread TaskGroup abi compatible with NDEBUG macro

    What problem does this PR solve?

    Issue Number: #2042

    Problem Summary: bthread::TaskGroup add a new member _sched_recursive_guard if NDEBUG is not defined, this cause abi incompatible.

    What is changed and the side effects?

    Changed: define the _sched_recursive_guard whether NDEBUG is defined or not

    Side effects:

    • Performance effects(性能影响): No

    • Breaking backward compatibility(向后兼容性): No


    Check List:

    • Please make sure your changes are compilable(请确保你的更改可以通过编译).
    • When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
    • Please follow Contributor Covenant Code of Conduct.(请遵循贡献者准则).
    opened by wwbmmm 0
Releases(1.3.0)
  • 1.3.0(Oct 25, 2022)

    What's Changed

    • Support gcc on linux arm64 by @jamesge
    • Support gcc version >= 11.2.0 by @wwbmmm in #1783
    • Support the latest version of bazel(default v4.2.2) by @hcoona in #1657
    • Support multi-dimension bvar, a powerful extension of bvar by @serverglen in #1608
    • Restruct event_dispatcher source file by @guodongxiaren in #1888
    • Add http retry with error code policy by @chenBright in #1927
    • Add Nacos naming service by @yyweii in #1922
    • Add customized server bvar prefix by @jenrryyou in #1854
    • Add escape log content before printing by @jamesge
    • Fix issues in FlatMap by @jamesge
    • Fix override issue in pb by @jamesge, @wwbmmm
    • Fix ALIGNAS/ALIGNOF/BAIDU_CACHELINE_ALIGMENT by @jamesge
    • Fix some warnings for clang and revert changes on ALIGNAS/ALIGNOF by @jamesge
    • Fix rpc_replay continue when failed to init channel by @ehds in #1938
    • Fix multi-dimension bvar compile error by @dabao085 in #1937
    • Fix bvar_dump_tabs default value problem by @yyweii in #1920
    • Fix butex_wait failed with timeout by @Huixxi in #1917
    • Fix rpc_replay can't send request equably by @bumingchun in #1910
    • Fix compile warning due to DumpOptions object by @ml-haha in #1905
    • Fix test_bvar fail on m1 mac by @wwbmmm in #1901
    • Fix the slow test in brpc_socket_unittest.cpp by @zyearn in #1898
    • Fix the first bthread keytable on worker pthread will be deleted twice by @chenBright in #1884
    • Fix currently broken MacOS build by @zyearn in #1871
    • Fix ProcessHttpRequest supports for http2 by @dandyhuang in #1868
    • Fix get_value core caused by the sampler thread start too early by @Huixxi in #1863
    • Fix UDS ut failed on MacOS by @wwbmmm in #1843
    • Fix coredump cause by bad growth_non_responsive http request by @acelyc111 in #1278
    • Fix not to abort when checking the errorno with unicode string by @tobegit3hub in #1142
    • Improve/add documents by @wwbmmm, @JackBoosY, @morningman, @serverglen, @chenBright, @guodongxiaren, @xdh0817, @KaneVV1, @tanzhongyi003, @lzfhust, @Huixxi
    • Fix typos by @opheliaKyouko, @day253, @chenBright, @fansehep

    Thanks to all contributors for the 1.3.0 version! Full Changelog: https://github.com/apache/incubator-brpc/compare/1.2.0...1.3.0

    Source code(tar.gz)
    Source code(zip)
  • 1.2.0(Jul 29, 2022)

    What's Changed

    • Support apple silicon by @jamesge
    • Add an option to allow serialize/deserialize to/from a json array by @wasphin in #1604
    • Add redis empty request check by @lzfhust in #1745
    • Add butex_wake_all support nosignal flag by @yanglimingcn in #1751
    • Add wr/wrr policy degradation by @Huixxi in #1571
    • Add with_snappy in cmake by @renzhong in #1799
    • Add check append return code by @wwbmmm in #1762
    • Add CXXFLAGS in compiling protoc-gen-mcpack by @jamesge
    • Fix the header guard of brpc/periodic_task.h by @TousakaRin in #1820
    • Fix build warning, ByteSize() is deprecated, use ByteSizeLong() instead by @yangzhg in #1723
    • Fix c struct compile error by @wolfdan666 in #1736
    • Fix auto https check by @renzhong in #1754
    • Fix json2pb::JsonToProtoMessage() supports parsing multiple jsons by @jamesge
    • Fix compile error due to std limits header absent by @GOGOYAO in #1764
    • Fix a deadlock happened in ClearAbandonedStreamsImpl path by @zyearn in #1781
    • Fix send WindowUpdate when ClearAbandonedStreams is called by @zyearn in #1786
    • Fix _dl_sym undefined reference by @wwbmmm in #1784
    • Fix thrift protocol exception by @lzfhust in #1790
    • Fix Brpc build tools error when only build static by @stdpain in #1797
    • Fix discovery naming service core by @serverglen in #1802
    • Fix rpc_press can't send request equably by @bumingchun #1763
    • Fix hostname2ip fails when aux_buf is not long enough by @chenBright in #1818
    • Improve documents by @wwbmmm, @tanzhongyi003, @guodongxiaren, @372046933, @wasphin, @hawkxiang, @TousakaRin, @Huixxi, @serverglen
    • Fix typos by @jamesge, @cyberkillor

    Thanks to all contributors for the 1.2.0 version! Full Changelog: https://github.com/apache/incubator-brpc/compare/1.1.0...1.2.0

    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Apr 11, 2022)

    What's Changed

    • Support ipv6 and unix domain socket by @wwbmmm in #1560
    • Support protobuf 3.19.x by @hcoona in #1679
    • Support http protocol dump and replay by @guodongxiaren in #1503
    • Support nshead protocol dump and replay by @wwbmmm in #1486
    • Support parse proto-text format http request body by @hiberabyss in #1690
    • Support deliver timeout from client to server for baidu_std protocol by @wwbmmm in #1472
    • Support inherit span on bthread create by @wwbmmm in #1494
    • Add rpc_replay BUILD file by @taoxu in #1677
    • Add brpc server Start(PortRange, const ServerOptions*) by @serverglen in #1460
    • Add FlatMap insert(const std::pair<key_type, mapped_type>& kv) by @serverglen in #1468
    • Add server eps bvar @serverglen in #1483
    • Fix CheckHealth not set has_request_code bug by @serverglen in #1502
    • Fix a bug that server will send unexpected data frame to client if there are errors occur during processing stream create request by @jenrryyou in #1516
    • Fix LA selection runs too long by @KaneVV1 in #1567
    • Fix HttpResponse error by @jl2005 in #1620
    • Fix bvar status compile error by @zwkno1 in #1625
    • Fix InputMessenger client side retry policy by @ehds in #1680
    • Fix work_stealing_queue_unittest for ARM by @TKONIY in #1709
    • Fix LatencyRecorder qps not accurate by @wwbmmm in #1708
    • Fix compile error after gcc11 with --std=c++20 by @hiberabyss in #1719
    • Fix unstable UT link error by @wwbmmm in #1711
    • Fix Thrift download url to avoid pr build failed by @yangzhg in #1725
    • Remove grpc ParseH2Settings warning log by @yanjianglu in #1599
    • Improve documents by @wwc7654321, @wwbmmm, @tanzhongyi003, @mahongweichina, @cdjingit, @dl239, @ehds
    • Fix typos by @yangzhg, @egolearner, @PengyiPan, @Aaaaaaron, @ehds, @JiaoZiLang, @mapleFU

    Thanks to all contributors for the 1.1.0 version! Full Changelog: https://github.com/apache/incubator-brpc/compare/1.0.0...1.1.0

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Dec 11, 2021)

    What's Changed

    • fix grpc ut by @zyearn in https://github.com/apache/incubator-brpc/pull/1036
    • replace_include_with_find_package by @zyearn in https://github.com/apache/incubator-brpc/pull/1032
    • ignore ELIMIT for circuit breaker by @TousakaRin in https://github.com/apache/incubator-brpc/pull/1005
    • limit minimum value of max_concurrency for auto_cl by @TousakaRin in https://github.com/apache/incubator-brpc/pull/1003
    • Add missing '`' by @lingbin in https://github.com/apache/incubator-brpc/pull/1053
    • fix heap overflow in simple_data_pool by @yockie in https://github.com/apache/incubator-brpc/pull/1056
    • fix redis args by @liumh8 in https://github.com/apache/incubator-brpc/pull/1128
    • timer_thread: remove redundant code by @lorinlee in https://github.com/apache/incubator-brpc/pull/1137
    • Update nshead_service.md by @pklim101 in https://github.com/apache/incubator-brpc/pull/1151
    • fix_share_tls_block by @zyearn in https://github.com/apache/incubator-brpc/pull/1156
    • (FIX COMMENT)butil: remove BasicStringPiece in comments by @mapleFU in https://github.com/apache/incubator-brpc/pull/1172
    • fix h2_req check failed when retry after ELIMIT error by @heyuyi0906 in https://github.com/apache/incubator-brpc/pull/1161
    • fix brpc.baidu.com not accessible by @zyearn in https://github.com/apache/incubator-brpc/pull/1189
    • add .asf.yaml to set github about info by @tanzhongyi003 in https://github.com/apache/incubator-brpc/pull/1222
    • update .asf.yaml to change RPC into lowercase by @tanzhongyi003 in https://github.com/apache/incubator-brpc/pull/1224
    • add option to allow access methods from default url by @wasphin in https://github.com/apache/incubator-brpc/pull/1214
    • For https naming service, use 443 as default port by @TousakaRin in https://github.com/apache/incubator-brpc/pull/1139
    • update StreamOptions by @cstarc in https://github.com/apache/incubator-brpc/pull/1247
    • Fix build break for clang 10.0.1 by @thanksunix in https://github.com/apache/incubator-brpc/pull/1261
    • coding style fix in brpc/trackme.cpp by @gydong in https://github.com/apache/incubator-brpc/pull/1270
    • Compatibility improvement of protobuf json format and spring http spec by @chenzhangyi in https://github.com/apache/incubator-brpc/pull/1292
    • Fix bazel build in macos by @chenzhangyi in https://github.com/apache/incubator-brpc/pull/1298
    • make butil::BasicStringPiece support string split functions-family by @lrita in https://github.com/apache/incubator-brpc/pull/1295
    • make butil::ScopedVector support std::initializer_list by @lrita in https://github.com/apache/incubator-brpc/pull/1291
    • Update docs by @serverglen in https://github.com/apache/incubator-brpc/pull/1258
    • Add rpm packaging spec by @wasphin in https://github.com/apache/incubator-brpc/pull/1290
    • Fix the compile error when using GCC compiler with asan enabled on Linux platform. by @warriorpaw in https://github.com/apache/incubator-brpc/pull/1289
    • Fix registering multiple addresses to discovery by @wasphin in https://github.com/apache/incubator-brpc/pull/1320
    • Fix rpm spec by @wasphin in https://github.com/apache/incubator-brpc/pull/1324
    • Remove FlameGraph dependency by @zyearn in https://github.com/apache/incubator-brpc/pull/1345
    • Fix build failure on macOS with FlameGraph by @gogdizzy in https://github.com/apache/incubator-brpc/pull/1411
    • status文档中的代码示例写错了,需要实现的函数名应为Describe by @guodongxiaren in https://github.com/apache/incubator-brpc/pull/1413
    • Update bvar.md by @codroc in https://github.com/apache/incubator-brpc/pull/1414
    • 修改la策略中的异常日志的级别,避免在使用glog的情况下core dump by @guodongxiaren in https://github.com/apache/incubator-brpc/pull/1415
    • Change chinese quotation marks in bvar_c++.md sample code by @tbago in https://github.com/apache/incubator-brpc/pull/1396
    • SampleRequest写错了应为SampledRequest by @guodongxiaren in https://github.com/apache/incubator-brpc/pull/1420
    • 修复rpc_replay中ChannelGroup初始化时resize的bug by @guodongxiaren in https://github.com/apache/incubator-brpc/pull/1422
    • fix warning in gcc8+ by @stdpain in https://github.com/apache/incubator-brpc/pull/1381
    • 文档修复:BRPC_RPC_VALIDATE_GFLAG改为BRPC_VALIDATE_GFLAG by @guodongxiaren in https://github.com/apache/incubator-brpc/pull/1426
    • 消除高版本GCC上编译时大量-Wclass-memaccess的警告 by @guodongxiaren in https://github.com/apache/incubator-brpc/pull/1427
    • rm DISCLAIMER-WIP and use DISCLAIMER for 1.0 release by @tanzhongyi003 in https://github.com/apache/incubator-brpc/pull/1432
    • Update flat_map.h by @yanjianglu in https://github.com/apache/incubator-brpc/pull/1352
    • add flag BTHREAD_NEVER_QUIT by @ustccy in https://github.com/apache/incubator-brpc/pull/1193
    • implement weighted randomized load balancer #1254 by @serverglen in https://github.com/apache/incubator-brpc/pull/1314
    • rpc_view support setting timeout by @serverglen in https://github.com/apache/incubator-brpc/pull/1459
    • Fix baidu_rpc_protocol.cpp a variable incorrectly named by @serverglen in https://github.com/apache/incubator-brpc/pull/1451
    • Fix Socket::WaitAndReset memory leak by @wwbmmm in https://github.com/apache/incubator-brpc/pull/1456
    • docs: fix server_push.md by @lorinlee in https://github.com/apache/incubator-brpc/pull/1463
    • Add gitignore for files generated during test by @wwbmmm in https://github.com/apache/incubator-brpc/pull/1473
    • docs: fix broken link in CONTRIBUTING.md by @lorinlee in https://github.com/apache/incubator-brpc/pull/1481
    • Add FlatMap example code by @serverglen in https://github.com/apache/incubator-brpc/pull/1484
    • Fix apache thrift download failed by @wwbmmm in https://github.com/apache/incubator-brpc/pull/1495
    • Fix http client doc by @wwbmmm in https://github.com/apache/incubator-brpc/pull/1493
    • Add DomainListNamingService which resolves services from the given list periodically by @chenzhangyi in https://github.com/apache/incubator-brpc/pull/1509
    • check is valid character in uri by @guodongxiaren in https://github.com/apache/incubator-brpc/pull/1506
    • emplace/emplace_back replace insert/push_back for pair by @guodongxiaren in https://github.com/apache/incubator-brpc/pull/1504
    • Update gdb_bthread_stack.py by @tanzhongyi003 in https://github.com/apache/incubator-brpc/pull/1521
    • Update get_brpc_revision.sh by @tanzhongyi003 in https://github.com/apache/incubator-brpc/pull/1520
    • Tanslate getting_started.md into Chinese by @guodongxiaren in https://github.com/apache/incubator-brpc/pull/1515
    • Update NOTICE by @tanzhongyi003 in https://github.com/apache/incubator-brpc/pull/1519
    • add missing notice for tools/pprof, test/crc32c_unittest.cc by @tanzhongyi003 in https://github.com/apache/incubator-brpc/pull/1522
    • docs: fix centos compile options by @lorinlee in https://github.com/apache/incubator-brpc/pull/1525
    • Add rtmp/FlvWriterOptions to support writing audio/video content only by @v1siuol in https://github.com/apache/incubator-brpc/pull/1505
    • upgrade baseimage to 20.04 by @tanzhongyi003 in https://github.com/apache/incubator-brpc/pull/1531
    • release 1.0.0-rc02 by @lorinlee in https://github.com/apache/incubator-brpc/pull/1538
    • Fix tools/get_brpc_revision.sh by @v1siuol in https://github.com/apache/incubator-brpc/pull/1536
    • update docs by @serverglen in https://github.com/apache/incubator-brpc/pull/1499
    • Set hostname rather than ip when channel Init by hostname but not host in http_requst().uri() by @guodongxiaren in https://github.com/apache/incubator-brpc/pull/1529
    • add cases.md by @tanzhongyi003 in https://github.com/apache/incubator-brpc/pull/1551
    • Add use case of Baidu by @wwbmmm in https://github.com/apache/incubator-brpc/pull/1557
    • docs(circuit_breaker): add ema wiki link by @JiaoZiLang in https://github.com/apache/incubator-brpc/pull/1575
    • Add Case by @guodongxiaren in https://github.com/apache/incubator-brpc/pull/1576
    • community: add release doc by @lorinlee in https://github.com/apache/incubator-brpc/pull/1582
    • Update release_cn.md by @tanzhongyi003 in https://github.com/apache/incubator-brpc/pull/1588

    Contributors

    Thanks to all contributors for the 1.0.0 version!

    • @zyearn
    • @jamesge
    • @chenzhangyi
    • @TousakaRin
    • @guodongxiaren
    • @old-bear
    • @lorinlee
    • @tanzhongyi003
    • @serverglen
    • @ipconfigme
    • @wasphin
    • @cdjingit
    • @jasonszang
    • @wenweihu86
    • @wwbmmm
    • @gongweibao
    • @lrita
    • @v1siuol
    • @wchengcheng
    • @eric-buaa-cn
    • @vongosling
    • @wanglun
    • @choleraehyq
    • @yanjianglu
    • @niukuo
    • @datonli
    • @lingbin
    • @2012-wangjiaqi
    • @mikeyang2015
    • @gydong
    • @heyuyi0906
    • @liuzhiwei
    • @yinqiwen
    • @cstarc
    • @yockie
    • @loveyacper
    • @ibyte2011
    • @codroc
    • @dzhwinter
    • @gavinchou
    • @llhe
    • @liupengs
    • @AlexiaChen
    • @zyctree
    • @ufosky
    • @aCoder2013
    • @tanguofu
    • @PragmaTwice
    • @Huoke
    • @weimzh
    • @aierui
    • @endyul
    • @yangzhg
    • @photoszzt
    • @byronhe
    • @cg82616424
    • @dyike
    • @fankux
    • @guangqianpeng
    • @gogdizzy
    • @guohao
    • @yichenluan
    • @Agent-Tao
    • @JiaoZiLang
    • @lsjbd
    • @mapleFU
    • @pexeer
    • @qiaohaijun
    • @sduzh
    • @sikanderiqbal
    • @Ye-Tian-Zero
    • @smartczy
    • @stdpain
    • @tbago
    • @PengyiPan
    • @pklim101
    • @warriorpaw
    • @JiYou
    • @zexuan

    Full Changelog: https://github.com/apache/incubator-brpc/compare/0.9.7...1.0.0

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0-rc02(Sep 12, 2021)

  • 0.9.7(Mar 6, 2020)

    • Add DISCLAIMER-WIP as license issues are not all resolved
    • Fix many license related issues
    • Ignore flow control in h2 when sending first request
    • Add flame graph view for profiling builtin service
    • Fix bug that _avg_latency maybe zero in lalb
    • Fix bug that logging namespace conflicts with others
    • Add gdb_bthread_stack.py to read bthread stack
    • Adapt to Arm64
    • Support redis server protocol
    • Enable circuit breaker for backup request
    • Support zone for bilibili discovery naming service when fetching server nodes
    • Add brpc revision in release version
    Source code(tar.gz)
    Source code(zip)
  • 0.9.6(Jul 16, 2019)

    459 commits since release 0.9.5 Notable ones:

    • Health (of a connection) can be checked at rpc-level
    • Fix SSL-related compilation issues on Mac
    • Support SSL-replacement lib MesaLink
    • Support consistent hashing with ketama algo.
    • bvar variables can be exported for prometheus services
    • String[Multi]Splitter supports '\0' as separator
    • Support for bilibili discovery service
    • Improved CircuitBreaker
    • grpc impl. supports timeout
    Source code(tar.gz)
    Source code(zip)
  • 0.9.5(Oct 30, 2018)

    644 commits since 0.9.0! with a lot of improvements and fixes. Major changes:

    • h2c/grpc are supported now, h2(encrypted) is not included.
    • thrift support.
    • Mac build support
    • Extend ConcurrencyLimiter to control max-concurrency dynamically and an "auto" CL is supported by default
    • CircuitBreaker support to isolate abnormal servers more effectively
    Source code(tar.gz)
    Source code(zip)
  • v0.9.0(Mar 20, 2018)

Owner
The Apache Software Foundation
The Apache Software Foundation
C++ framework for json-rpc (json remote procedure call)

I am currently working on a new C++17 implementation -> json-rpc-cxx. Master Develop | libjson-rpc-cpp This framework provides cross platform JSON-RPC

Peter Spiess-Knafl 833 Jan 7, 2023
c++11, high performance, cross platform, easy to use rpc framework.

modern C++(C++11), simple, easy to use rpc framework

qicosmos 1.2k Dec 30, 2022
Cap'n Proto serialization/RPC system - core tools and C++ library

Cap'n Proto is an insanely fast data interchange format and capability-based RPC system. Think JSON, except binary. Or think Protocol Buffers, except

Cap'n Proto 9.5k Dec 30, 2022
rpclib is a modern C++ msgpack-RPC server and client library

rpclib rpclib is a RPC library for C++, providing both a client and server implementation. It is built using modern C++14, and as such, requires a rec

null 1.4k Dec 30, 2022
Groupware server backend with RPC/HTTP, MAPI/HTTP, IMAP, POP3 and PHP-MAPI support

Gromox is the central groupware server component of grammm. It is capable of serving as a replacement for Microsoft Exchange and compatibles. Connecti

grammm 139 Dec 26, 2022
a simple RPC wrapper generator to C/C++ functions

This project initiated from the following practical problem. To control experimental equipment via computers, manufactures provide software drivers wi

Pearu Peterson 33 Jan 8, 2023
In-progress multi-PC remote management and administration software

Volition is software to administrate, configure, and monitor vast amounts of PCs simultaneously. The end goal is to create something significantly easier to use and more flexible than Puppet or Ansible, while allowing a single command to perform a similar action on thousands of nodes running vastly different operating systems.

null 5 May 9, 2022
RPC based on C++ Workflow. Supports Baidu bRPC, Tencent tRPC, thrift protocols.

中文版入口 SRPC Introduction SRPC is an RPC system developed by Sogou. Its main features include: Base on Sogou C++ Workflow, with the following features:

C++ Workflow Project and Ecosystem 1.5k Jan 3, 2023
TNLMeans is an implementation of the NL-means denoising algorithm in an Avisynth filter

TNLMeans TNLMeans is an implementation of the NL-means denoising algorithm in an Avisynth filter (by tritical) Requirements This filter requires AviSy

Ferenc Pintér 9 Feb 4, 2022
📘 MIPT University - Olympiad School of Competitive Programming (C++) Curated repository with full explanations, solutions & written lectures collected throughout my academic experience at MIPT school

MIPT - Olympiad School of Competitive Programming (with C++) Outcomes: Studying at this school has allowed be to explore numerous algorithms, data str

Artem Moshnin 1 Nov 24, 2021
Microsoft 2.5k Dec 31, 2022
The BNG Blaster is a test tool to simulate thousands of PPPoE or IPoE subscribers including IPTV, traffic verification and convergence testing capabilities.

RtBrick BNG Blaster The BNG Blaster is a test tool to simulate thousands of PPPoE or IPoE subscribers including IPTV, traffic verification and converg

RtBrick 97 Dec 22, 2022
Netdata's distributed, real-time monitoring Agent collects thousands of metrics from systems, hardware, containers, and applications with zero configuration.

Netdata is high-fidelity infrastructure monitoring and troubleshooting. It runs permanently on all your physical/virtual servers, containers, cloud deployments, and edge/IoT devices, and is perfectly safe to install on your systems mid-incident without any preparation.

netdata 61.6k Jan 4, 2023
Subscribe anime RSS to download, repack, upload to Baidu, and post on TSDM automatically.

AnimeRSSforTSDM This is a project to automatically transfer Anime to Baidu netdisk with some rules on TSDM. Watch this post in detail. System Flow Cha

InanitySnow 2 Dec 15, 2022
this lib with 26 template container and 10 kinds of algorithm, it is a good lib for study and usage

simple stl this lib simplify the achievement detail of common container, but add the container variety, the whole code partily follow Google Style. Em

wujiazheng 7 Mar 10, 2022
ModuLiDAR is an all-in-one open-source software for autonomous UGVs and industrial robots.

ModuLiDAR is an all-in-one open-source software for autonomous UGVs and industrial robots. the target industries that ModuLiDAR is working on are farming industry, mining industry, warehouses industry, and construction industry.

null 18 Dec 12, 2022
This is official repository of the course Industrial Informatics LT, Year 2021/22, at University of Modena and Reggio Emilia, held at Fondazione Universitaria di Mantova

Industrial informatics LT - Mantova - 2021/22 This is official repository of the course Industrial Informatics LT, Year 2020/21, at University of Mode

High-Performance Real-Time Lab 4 Jun 27, 2022
16 channel R/C system for models of all kinds

A 16 channel Radio Controlled system for R/C models of all kinds. This project was started during the 2020 pandemic lockdown (thus the title), and has since grown out of passion & enthusiasm.

Malcolm Messiter 9 Dec 14, 2022