Skip to content

Commit

Permalink
remove comments on baidu-only firewall rules & add a pptx tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
gejun committed Sep 14, 2017
1 parent c3ae57a commit ee377b5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ Check out [benchmark](docs/cn/benchmark.md) for a comparison between brpc and ot
* [IOBuf](docs/cn/iobuf.md)
* [Streaming Log](docs/cn/streaming_log.md)
* [FlatMap](docs/cn/flatmap.md)
* [brpc外功修炼宝典](docs/cn/brpc_intro.pptx)(新人培训材料)
* RPC in depth
* [New Protocol](docs/cn/new_protocol.md)
* [atomic instructions](docs/cn/atomic_instructions.md)
Expand Down
Binary file added docs/cn/brpc_intro.pptx
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/cn/builtin_service.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 什么是内置服务?

内置服务以多种形式展现服务器内部状态,提高你开发和调试服务的效率。brpc通过HTTP协议提供内置服务,可通过浏览器或curl访问,服务器会根据User-Agent返回纯文本或html,你也可以添加?console=1要求返回纯文本。我们在自己的开发机上启动了[一个长期运行的例子](http://brpc.baidu.com:8765/),你可以点击后随便看看。服务端口只有在8000-8999内才能被笔记本访问到,对于范围之外的端口可以使用[rpc_view](rpc_view.md)或在命令行中使用curl <SERVER-URL>。
内置服务以多种形式展现服务器内部状态,提高你开发和调试服务的效率。brpc通过HTTP协议提供内置服务,可通过浏览器或curl访问,服务器会根据User-Agent返回纯文本或html,你也可以添加?console=1要求返回纯文本。我们在自己的开发机上启动了[一个长期运行的例子](http://brpc.baidu.com:8765/),你可以点击后随便看看。对于服务端口被限的情况(比如百度内在8000-8999内才能被笔记本访问到),可以使用[rpc_view](rpc_view.md)转发或在命令行中使用curl \<SERVER-URL\>

从浏览器访问:

Expand Down
2 changes: 1 addition & 1 deletion docs/cn/rpc_press.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ dummy_server启动时会在终端打印日志,一般按住ctrl点击那个链

![img](../images/rpc_press_2.png)

你可以通过-dummy_port参数修改dummy_server的端口,但请确保端口在8000到8999范围内,否则总是无法在浏览器中访问
你可以通过-dummy_port参数修改dummy_server的端口,请确保端口可以在浏览器中访问

如果你无法打开浏览器,命令行中也会定期打印信息:

Expand Down
2 changes: 1 addition & 1 deletion docs/cn/rpc_view.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rpc_view可以查看端口不在8000-8999的server的内置服务。之前如果一个服务的端口不在8000-8999,我们只能在命令行下使用curl查看它的内置服务,没有历史趋势和动态曲线,也无法点击链接,排查问题不方便。rpc_view是一个特殊的http proxy:把对它的所有访问都转为对目标server的访问。只要把rpc_view启动在8000-8999端口,我们就能通过它看到原本不能直接看到的server了。
rpc_view可以转发端口被限的server的内置服务。像百度内如果一个服务的端口不在8000-8999,就只能在命令行下使用curl查看它的内置服务,没有历史趋势和动态曲线,也无法点击链接,排查问题不方便。rpc_view是一个特殊的http proxy:把对它的所有访问都转为对目标server的访问。只要把rpc_view的端口能在浏览器中被访问,我们就能通过它看到原本不能直接看到的server了。

# 获取工具

Expand Down
6 changes: 2 additions & 4 deletions src/brpc/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,8 @@ struct ServerOptions {
// redirected by nginx or other http front-end servers), set this port
// to a port number that's ONLY accessible from Baidu's internal network
// so that you can check out the builtin services from this port while
// hiding them from public. This port is better inside 8000-8999 which
// is accessible from your web browser due to Baidu's firewall rules.
// Setting this option also enables security protection code which we
// may add constantly.
// hiding them from public. Setting this option also enables security
// protection code which we may add constantly.
// Update: this option affects Tabbed services as well.
// Default: -1
int internal_port;
Expand Down

0 comments on commit ee377b5

Please sign in to comment.