Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
ee377b5d
Commit
ee377b5d
authored
Sep 14, 2017
by
gejun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove comments on baidu-only firewall rules & add a pptx tutorial
parent
c3ae57a0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
7 deletions
+6
-7
README.md
README.md
+1
-0
brpc_intro.pptx
docs/cn/brpc_intro.pptx
+0
-0
builtin_service.md
docs/cn/builtin_service.md
+1
-1
rpc_press.md
docs/cn/rpc_press.md
+1
-1
rpc_view.md
docs/cn/rpc_view.md
+1
-1
server.h
src/brpc/server.h
+2
-4
No files found.
README.md
View file @
ee377b5d
...
...
@@ -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
)
...
...
docs/cn/brpc_intro.pptx
0 → 100644
View file @
ee377b5d
File added
docs/cn/builtin_service.md
View file @
ee377b5d
# 什么是内置服务?
内置服务以多种形式展现服务器内部状态,提高你开发和调试服务的效率。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
\
>
。
从浏览器访问:
...
...
docs/cn/rpc_press.md
View file @
ee377b5d
...
...
@@ -73,7 +73,7 @@ dummy_server启动时会在终端打印日志,一般按住ctrl点击那个链
![
img
](
../images/rpc_press_2.png
)
你可以通过-dummy_port参数修改dummy_server的端口,
但请确保端口在8000到8999范围内,否则总是无法
在浏览器中访问。
你可以通过-dummy_port参数修改dummy_server的端口,
请确保端口可以
在浏览器中访问。
如果你无法打开浏览器,命令行中也会定期打印信息:
...
...
docs/cn/rpc_view.md
View file @
ee377b5d
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了。
# 获取工具
...
...
src/brpc/server.h
View file @
ee377b5d
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment