framework.conf 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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 = 5000
  12. #模块间调用[可选]
  13. stat = TestApp.FrameworkServer.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.FrameworkServer
  26. </client>
  27. #定义所有绑定的IP
  28. <server>
  29. start_output = ERROR
  30. closecout = 0
  31. #应用名称
  32. app = TestApp
  33. #服务名称
  34. server = FrameworkServer
  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 15701 -t 10000
  48. #本地node的ip:port:timeout[可选]
  49. # node = ServerObj@tcp -h 127.0.0.1 -p 2345 -t 10000
  50. #配置中心的地址[可选]
  51. config = TestApp.FrameworkServer.ConfigObj
  52. #配置中心的地址[可选]
  53. # notify = tars.tarsconfig.NotifyObj
  54. #远程LogServer[可选]
  55. log = TestApp.FrameworkServer.LogObj
  56. <ConfigAdapter>
  57. #ip:port:timeout
  58. endpoint = tcp -h 127.0.0.1 -p 11003 -t 60000
  59. #allow ip
  60. allow =
  61. #max connection num
  62. maxconns = 4096
  63. #imp thread num
  64. threads = 5
  65. #servant
  66. servant = TestApp.FrameworkServer.ConfigObj
  67. #queue capacity
  68. queuecap = 1000000
  69. </ConfigAdapter>
  70. <LogAdapter>
  71. #ip:port:timeout
  72. endpoint = tcp -h 127.0.0.1 -p 11005 -t 60000
  73. #allow ip
  74. allow =
  75. #max connection num
  76. maxconns = 4096
  77. #imp thread num
  78. threads = 5
  79. #servant
  80. servant = TestApp.FrameworkServer.LogObj
  81. #queue capacity
  82. queuecap = 1000000
  83. </LogAdapter>
  84. <RegistryAdapter>
  85. #ip:port:timeout
  86. endpoint = tcp -h 127.0.0.1 -p 11004 -t 60000
  87. #allow ip
  88. allow =
  89. #max connection num
  90. maxconns = 4096
  91. #imp thread num
  92. threads = 5
  93. #servant
  94. servant = TestApp.FrameworkServer.QueryObj
  95. #queue capacity
  96. queuecap = 1000000
  97. </RegistryAdapter>
  98. <StatAdapter>
  99. #ip:port:timeout
  100. endpoint = tcp -h 127.0.0.1 -p 12004 -t 60000
  101. #allow ip
  102. allow =
  103. #max connection num
  104. maxconns = 4096
  105. #imp thread num
  106. threads = 5
  107. #servant
  108. servant = TestApp.FrameworkServer.StatObj
  109. #queue capacity
  110. queuecap = 1000000
  111. </StatAdapter>
  112. </server>
  113. </application>
  114. <log>
  115. logpath = .
  116. logthread = 1
  117. ipfix = true
  118. </log>
  119. </tars>