rpc3.conf 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <tars>
  2. <application>
  3. #proxy需要的配置
  4. <client>
  5. #地址
  6. locator = TestApp.FrameworkServer.QueryObj@tcp -h 127.0.0.1 -p 11004
  7. #最大超时时间(毫秒)
  8. sync-invoke-timeout = 5000
  9. async-invoke-timeout = 60000
  10. #刷新端口时间间隔(毫秒)
  11. refresh-endpoint-interval = 100000
  12. #模块间调用[可选]
  13. stat = tars.tarsstat.StatObj
  14. #发送队列长度
  15. sendqueuelimit = 1000000
  16. #异步回调队列个数限制
  17. asyncqueuecap = 1000000
  18. #网络异步回调线程个数
  19. asyncthread = 3
  20. #网络线程个数
  21. netthread = 2
  22. #合并回调线程和网络线程(以网络线程个数为准)
  23. mergenetasync = 0
  24. #模块名称
  25. modulename = TestApp.RpcServer
  26. </client>
  27. #定义所有绑定的IP
  28. <server>
  29. start_output = ERROR
  30. closecout = 0
  31. #应用名称
  32. app = TestApp
  33. #服务名称
  34. server = RpcServer
  35. #服务的数据目录,可执行文件,配置文件等
  36. basepath = .
  37. datapath = .
  38. #日志路径
  39. logpath = .
  40. #网络线程个数
  41. netthread = 1
  42. #合并网络和业务线程(以网络线程个数为准)
  43. mergenetimp = 0
  44. opencoroutine = 0
  45. loglevel=TARS
  46. #本地管理套接字[可选]
  47. # local = tcp -h 127.0.0.1 -p 15001 -t 10000
  48. #本地node的ip:port:timeout[可选]
  49. # node = ServerObj@tcp -h 127.0.0.1 -p 2345 -t 10000
  50. #配置中心的地址[可选]
  51. # config = tars.tarsconfig.ConfigObj
  52. #配置中心的地址[可选]
  53. # notify = tars.tarsconfig.NotifyObj
  54. #远程LogServer[可选]
  55. # log = tars.tarslog.LogObj
  56. # manuallisten = 1
  57. #配置绑定端口
  58. <RpcAdapter>
  59. #ip:port:timeout
  60. endpoint = tcp -h 127.0.0.1 -p 9992 -t 10000
  61. #允许的IP地址
  62. allow =
  63. #最大连接数
  64. maxconns = 4096
  65. #当前线程个数
  66. threads = 5
  67. #处理对象
  68. servant = TestApp.RpcServer.HelloObj
  69. #队列最大包个数
  70. queuecap = 1000000
  71. #protocol = not-tars
  72. </RpcAdapter>
  73. <HttpAdapter>
  74. #ip:port:timeout
  75. endpoint = tcp -h 127.0.0.1 -p 8182 -t 10000
  76. #允许的IP地址
  77. allow =
  78. #最大连接数
  79. maxconns = 4096
  80. #当前线程个数
  81. threads = 5
  82. #处理对象
  83. servant = TestApp.RpcServer.HttpObj
  84. #队列最大包个数
  85. queuecap = 1000000
  86. protocol = not-tars
  87. </HttpAdapter>
  88. </server>
  89. </application>
  90. </tars>