Skip to content

Latest commit

 

History

History
55 lines (26 loc) · 2.16 KB

builtin_service.md

File metadata and controls

55 lines (26 loc) · 2.16 KB

About Builtin Services

Builtin services expose internal status of servers, making development and debugging more efficient over brpc. brpc serves builting services via HTTP, which can be easily accessed through curl and browsers. Servers respond plain text or html according to User-Agent in the request header, or you can append ?console=1 to the uri which forces servers to respond plain text. Here's an example running on our machine, check it out for more information about the builtin services. If the listen port is filtered(e.g. only ports in 8000-8999 can be accessed outside data centers in Baidu), you can run rpc_view to launch a proxy or run curl \<SERVER-URL\> inside data centers.

Accessed through browsers:

img

Accessed through terminal:

img

Safe Mode

To stay safe from attack, you must disable builtin services in the servers on public network, including the ones accessed by proxies(nginx or other http servers). Click here for more details.

Main services:

status

vars

connections

flags

rpcz

cpu profiler

heap profiler

contention profiler

Other services

version service shows the version of the server。Invoke Server::set_version() to specify version of your server, or brpc would generate a default version in like brpc_server_<service-name1>_<service-name2> ...

img

health service shows whether this server is alive or not.

img

protobufs service shows scheme of all the protobuf messages insides the server.

img

vlog service shows all the VLOG that can be enable(not work with glog).

img