This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-docs.git
The following commit(s) were added to refs/heads/master by this push:
new 2430a41 [SCB-594]add service center configurations
2430a41 is described below
commit 2430a41b9c9ff82adc6449b22af7049b3f20e658
Author: liubao <[email protected]>
AuthorDate: Tue Dec 25 09:57:55 2018 +0800
[SCB-594]add service center configurations
---
java-chassis-reference/en_US/general-development/visit-sc.md | 11 +++++++++--
java-chassis-reference/zh_CN/general-development/visit-sc.md | 10 ++++++++--
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/java-chassis-reference/en_US/general-development/visit-sc.md
b/java-chassis-reference/en_US/general-development/visit-sc.md
index f29f7b8..9cc2b77 100755
--- a/java-chassis-reference/en_US/general-development/visit-sc.md
+++ b/java-chassis-reference/en_US/general-development/visit-sc.md
@@ -1,8 +1,8 @@
## Concept Description
-The system realizes the discovery between services through the service center.
During the service startup process, the service center is registered. When
calling other services, the service center will query the instance information
of other services, such as the access address, the protocol used, and other
parameters. The service center supports the use of PULL and PUSH modes to
notify instance changes.
-
+The system realizes the discovery between services through the [service
center](https://github.com/apache/servicecomb-service-center) . During the
service startup process, the service center is registered. When calling other
services, the service center will query the instance information of other
services, such as the access address, the protocol used, and other parameters.
The service center supports the use of PULL and PUSH modes to notify instance
changes.
+Developers can configure service center clusters addresses, connection
parameters, heartbeat management and so on.
## Configuration instructions
@@ -17,3 +17,10 @@ The system realizes the discovery between services through
the service center. D
| servicecomb.service.registry. Autodiscovery | false | | No | Whether to
automatically discover the address of the service center. This configuration is
enabled when a partial address needs to be configured, and other addresses are
discovered by the configured service center instance. | |
| servicecomb.service.registry.instance.healthCheck.interval | 30 | | No |
Heartbeat interval. | |
| servicecomb.service.registry.instance.healthCheck.times | 3 | | No | Number
of allowed heartbeat failures. If there is (times + 1) continuous heartbeat
failures, this instance will be automatically logged off by service-center,
i.e. interval \* (times + 1) determines when the instance is automatically
logged off. If the service center waits for such a long time and does not
receive a heartbeat, the instance will be logged off. | |
+| servicecomb.service.registry.instance.empty.protection | true | | No | When
service center gives empty server list, will not remove local address cache
when true. | |
+| servicecomb.service.registry.client.timeout.connection | 30000 | |
Connection timeout in milliseconds | | |
+| servicecomb.service.registry.client.timeout.request | 30000 | | Request
timeout in milliseconds | | |
+| servicecomb.service.registry.client.timeout.idle | 60 | | Connection idle
timeout in milliseconds | | |
+| servicecomb.service.registry.client.timeout.heartbeat | 3000 | | Heartbeat
request timeout in milliseconds | | |
+
+
diff --git a/java-chassis-reference/zh_CN/general-development/visit-sc.md
b/java-chassis-reference/zh_CN/general-development/visit-sc.md
index 8e2e9d3..de66d18 100644
--- a/java-chassis-reference/zh_CN/general-development/visit-sc.md
+++ b/java-chassis-reference/zh_CN/general-development/visit-sc.md
@@ -1,8 +1,8 @@
## 概念阐述
-系统通过服务中心实现服务之间的发现。服务启动过程中,会向服务中心进行注册。在调用其他服务的时候,会从服务中心查询其他服务的实例信息,比如访问地址、使用的协议以及其他参数。服务中心支持使用PULL和PUSH两种模式通知实例变化。
-
+系统通过[服务中心](https://github.com/apache/servicecomb-service-center)实现服务之间的发现。服务启动过程中,会向服务中心进行注册。在调用其他服务的时候,会从服务中心查询其他服务的实例信息,比如访问地址、使用的协议以及其他参数。服务中心支持使用PULL和PUSH两种模式通知实例变化。
+开发者可以配置服务中心集群地址、连接参数以及心跳管理等。
## 配置说明
@@ -17,3 +17,9 @@
| servicecomb.service.registry.autodiscovery | false | | 否 |
是否自动发现服务中心的地址。当需要配置部分地址,其他地址由配置的服务中心实例发现的时候,开启这个配置。 | |
| servicecomb.service.registry.instance.healthCheck.interval | 30 | | 否 |
心跳间隔。 | |
| servicecomb.service.registry.instance.healthCheck.times | 3 | | 否 |
允许的心跳失败次数。当连续第times+1次心跳仍然失败时则实例被sc下线。即interval \* (times +
1)决定了实例被自动注销的时间。如果服务中心等待这么长的时间没有收取到心跳,会注销实例。 | |
+| servicecomb.service.registry.instance.empty.protection | true | | 否 |
当从服务中心查询到的地址为空的时候,是否覆盖本地缓存。这个是一种可靠性保护机制,避免实例异常批量下线导致的请求失败。 | |
+| servicecomb.service.registry.client.timeout.connection | 30000 | | 连接超时时间 |
单位毫秒 | |
+| servicecomb.service.registry.client.timeout.request | 30000 | | 请求超时时间 |
单位毫秒 | |
+| servicecomb.service.registry.client.timeout.idle | 60 | | 连接闲置超时时间 | 单位秒 |
|
+| servicecomb.service.registry.client.timeout.heartbeat | 3000 | | 心跳超时时间 |
单位毫秒 | |
+