forked from apache/dubbo-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add:reference & service protocol default
- Loading branch information
Showing
5 changed files
with
170 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# dubbo client yaml configure file | ||
|
||
filter: "" | ||
|
||
# client | ||
request_timeout : "100ms" | ||
# connect timeout | ||
connect_timeout : "100ms" | ||
check: true | ||
# application config | ||
application_config: | ||
organization : "ikurento.com" | ||
name : "BDTService" | ||
module : "dubbogo user-info client" | ||
version : "0.0.1" | ||
owner : "ZX" | ||
environment : "dev" | ||
|
||
registries : | ||
|
||
"hangzhouzk": | ||
protocol: "zookeeper" | ||
timeout : "3s" | ||
address: "127.0.0.1:2181" | ||
username: "" | ||
password: "" | ||
"shanghaizk": | ||
protocol: "zookeeper" | ||
timeout : "3s" | ||
address: "127.0.0.1:2182" | ||
username: "" | ||
password: "" | ||
|
||
references: | ||
"UserProvider": | ||
registry: "hangzhouzk,shanghaizk" | ||
filter: "" | ||
version: "1.0" | ||
group: "as" | ||
interface : "com.ikurento.user.UserProvider" | ||
url: "dubbo://127.0.0.1:20000/UserProvider" | ||
cluster: "failover" | ||
methods : | ||
- name: "GetUser" | ||
retries: 3 | ||
params: | ||
"serviceid": | ||
"soa.com.ikurento.user.UserProvider" | ||
"forks": 5 | ||
|
||
protocol_conf: | ||
dubbo: | ||
reconnect_interval: 0 | ||
connection_number: 2 | ||
heartbeat_period: "5s" | ||
session_timeout: "20s" | ||
pool_size: 64 | ||
pool_ttl: 600 | ||
# gr_pool_size is recommended to be set to [cpu core number] * 100 | ||
gr_pool_size: 1200 | ||
# queue_len is recommended to be set to 64 or 128 | ||
queue_len: 64 | ||
# queue_number is recommended to be set to gr_pool_size / 20 | ||
queue_number: 60 | ||
getty_session_param: | ||
compress_encoding: false | ||
tcp_no_delay: true | ||
tcp_keep_alive: true | ||
keep_alive_period: "120s" | ||
tcp_r_buf_size: 262144 | ||
tcp_w_buf_size: 65536 | ||
pkg_wq_size: 512 | ||
tcp_read_timeout: "1s" | ||
tcp_write_timeout: "5s" | ||
wait_timeout: "1s" | ||
max_msg_len: 1024 | ||
session_name: "client" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# dubbo server yaml configure file | ||
|
||
filter: "" | ||
# application config | ||
application_config: | ||
organization : "ikurento.com" | ||
name : "BDTService" | ||
module : "dubbogo user-info server" | ||
version : "0.0.1" | ||
owner : "ZX" | ||
environment : "dev" | ||
|
||
registries : | ||
"hangzhouzk": | ||
protocol: "zookeeper" | ||
timeout : "3s" | ||
address: "127.0.0.1:2181" | ||
username: "" | ||
password: "" | ||
"shanghaizk": | ||
protocol: "zookeeper" | ||
timeout : "3s" | ||
address: "127.0.0.1:2182" | ||
username: "" | ||
password: "" | ||
|
||
|
||
services: | ||
"UserProvider": | ||
registry: "hangzhouzk,shanghaizk" | ||
filter: "" | ||
# equivalent to interface of dubbo.xml | ||
interface : "com.ikurento.user.UserProvider" | ||
loadbalance: "random" | ||
version: "1.0" | ||
group: "as" | ||
warmup: "100" | ||
cluster: "failover" | ||
methods: | ||
- name: "GetUser" | ||
retries: 1 | ||
loadbalance: "random" | ||
|
||
protocols: | ||
"dubbo": | ||
name: "dubbo" | ||
# while using dubbo protocol, ip cannot is 127.0.0.1, because client of java-dubbo will get 'connection refuse' | ||
ip : "127.0.0.1" | ||
port : 20000 | ||
#- name: "jsonrpc" | ||
# ip: "127.0.0.1" | ||
# port: 20001 | ||
|
||
protocol_conf: | ||
dubbo: | ||
session_number: 700 | ||
session_timeout: "20s" | ||
# gr_pool_size is recommended to be set to [cpu core number] * 10 | ||
gr_pool_size: 120 | ||
# queue_len is recommended to be set to 64 or 128 | ||
queue_len: 64 | ||
# queue_number is recommended to be set to gr_pool_size / 20 | ||
queue_number: 6 | ||
getty_session_param: | ||
compress_encoding: false | ||
tcp_no_delay: true | ||
tcp_keep_alive: true | ||
keep_alive_period: "120s" | ||
tcp_r_buf_size: 262144 | ||
tcp_w_buf_size: 65536 | ||
pkg_wq_size: 512 | ||
tcp_read_timeout: "1s" | ||
tcp_write_timeout: "5s" | ||
wait_timeout: "1s" | ||
max_msg_len: 1024 | ||
session_name: "server" |