config.conf 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <tars>
  2. <application>
  3. #proxy需要的配置
  4. <client>
  5. #地址
  6. locator = tars.tarsregistry.QueryObj@tcp -h 127.0.0.1 -p 17890
  7. #最大超时时间(毫秒)
  8. sync-invoke-timeout = 5000
  9. #刷新端口时间间隔(毫秒)
  10. refresh-endpoint-interval = 10000
  11. #模块间调用[可选]
  12. stat = tars.tarsstat.StatObj
  13. #发送队列长度
  14. sendqueuelimit = 100000
  15. #异步回调队列个数限制
  16. asyncqueuecap = 100000
  17. #网络异步回调线程个数
  18. asyncthread = 3
  19. #网络线程个数
  20. netthread = 3
  21. #合并回调线程和网络线程(以网络线程个数为准)
  22. mergenetasync = 0
  23. #模块名称
  24. modulename = TestApp.HttpServer
  25. </client>
  26. #定义所有绑定的IP
  27. <server>
  28. closecout = 0
  29. #应用名称
  30. app = TestApp
  31. #服务名称
  32. server = HttpServer
  33. #服务的数据目录,可执行文件,配置文件等
  34. basepath = ./
  35. datapath = ./
  36. #日志路径
  37. logpath = ./
  38. mergenetimp = 0
  39. #本地管理套接字[可选]
  40. local = tcp -h 127.0.0.1 -p 15001 -t 10000
  41. #本地node的ip:port:timeout[可选]
  42. # node = ServerObj@tcp -h 127.0.0.1 -p 2345 -t 10000
  43. #配置中心的地址[可选]
  44. # config = tars.tarsconfig.ConfigObj
  45. #配置中心的地址[可选]
  46. # notify = tars.tarsconfig.NotifyObj
  47. #远程LogServer[可选]
  48. # log = tars.tarslog.LogObj
  49. #配置绑定端口
  50. <HttpAdapter>
  51. endpoint = tcp -h 0.0.0.0 -p 8081 -t 10000
  52. allow =
  53. maxconns = 4096
  54. threads = 5
  55. servant = TestApp.HttpServer.HttpObj
  56. queuecap = 1000000
  57. protocol = not-tars
  58. </HttpAdapter>
  59. </server>
  60. </application>
  61. </tars>