1. {
    2. "servers": [
    3. {
    4. "default_log_path": "/home/admin/mosn/logs/default.log",
    5. "default_log_level": "DEBUG",
    6. "graceful_timeout": "10s",
    7. "Processor": 1,
    8. "listeners": [
    9. {
    10. "name": "egress_sofa",
    11. "address": "0.0.0.0:12220",
    12. "bind_port": true,
    13. "filter_chains": [
    14. {
    15. "match":"",
    16. "tls_context":{
    17. "status": true,
    18. "inspector": true,
    19. "server_name": "hello.com",
    20. "cacert": "-----BEGIN CERTIFICATE-----\nMIIDMjCCAhoCCQDaFC8PcSS5qTANBgkqhkiG9w0BAQsFADBbMQswCQYDVQQGEwJD\nTjEKMAgGA1UECAwBYTEKMAgGA1UEBwwBYTEKMAgGA1UECgwBYTEKMAgGA1UECwwB\nYTEKMAgGA1UEAwwBYTEQMA4GCSqGSIb3DQEJARYBYTAeFw0xODA2MTQwMjQyMjVa\nFw0xOTA2MTQwMjQyMjVaMFsxCzAJBgNVBAYTAkNOMQowCAYDVQQIDAFhMQowCAYD\nVQQHDAFhMQowCAYDVQQKDAFhMQowCAYDVQQLDAFhMQowCAYDVQQDDAFhMRAwDgYJ\nKoZIhvcNAQkBFgFhMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArbNc\nmOXvvOqZgJdxMIiklE8lykVvz5d7QZ0+LDVG8phshq9/woigfB1aFBAI36/S5LZQ\n5Fd0znblSa+LOY06jdHTkbIBYFlxH4tdRaD0B7DbFzR5bpzLv2Q+Zf5u5RI73Nky\nH8CjW9QJjboArHkwm0YNeENaoR/96nYillgYLnunol4h0pxY7ZC6PpaB1EBaTXcz\n0iIUX4ktUJQmYZ/DFzB0oQl9IWOj18ml2wYzu9rYsySzj7EPnDOOebsRfS5hl3fz\nHi4TC4PDh0mQwHqDQ4ncztkybuRSXFQ6RzEPdR5qtp9NN/G/TlfyB0CET3AFmGkp\nE2irGoF/JoZXEDeXmQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQApzhQLS7fAcExZ\nx1S+hcy7l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ECDHE-RSA-AES256-GCM-SHA384",
    25. "ecdhCurves": "P256"
    26. },
    27. "filters": [
    28. {
    29. "type": "proxy",
    30. "config": {
    31. "DownstreamProtocol": "SofaRpc",
    32. "Name": "proxy_config",
    33. "SupportDynamicRoute": true,
    34. "UpstreamProtocol": "SofaRpc",
    35. "VirtualHosts": [
    36. {
    37. "Name": "sofa",
    38. "RequireTls": "no",
    39. "Domains":[
    40. "*testwilccard"
    41. ],
    42. "Routers": [
    43. {
    44. "Match": {
    45. "Headers": [
    46. {
    47. "Name": "service",
    48. "Value": "com.alipay.rpc.common.service.facade.pb.SampleServicePb:1.0",
    49. "Regex":false
    50. }
    51. ]
    52. },
    53. "Route": {
    54. "ClusterName": "test_cpp",
    55. "MetadataMatch": {
    56. "filter_metadata": {
    57. "mosn.lb": {
    58. "version":"1.1",
    59. "stage":"pre-release",
    60. "label": "gray"
    61. }
    62. }
    63. }
    64. }
    65. }
    66. ]
    67. }
    68. ]
    69. }
    70. }
    71. ]
    72. }
    73. ],
    74. "stream_filters": [
    75. {
    76. "type": "healthcheck",
    77. "config": {
    78. "cache_time": "360s",
    79. "cluster_min_healthy_percentages": {
    80. "local_service": 70
    81. },
    82. "passthrough": false
    83. }
    84. }
    85. ],
    86. "log_path": "/home/admin/mosn/logs/egress.log",
    87. "log_level": "DEBUG",
    88. "access_logs": [
    89. {
    90. "log_path": "./access_egress.log",
    91. "log_format": "%StartTime% %RequestReceivedDuration% %ResponseReceivedDuration% %REQ.requestid% %REQ.cmdcode% %RESP.requestid% %RESP.service%"
    92. }
    93. ],
    94. "disable_conn_io": false
    95. }
    96. ]
    97. }
    98. ],
    99. "cluster_manager": {
    100. "auto_discovery": true,
    101. "registry_use_health_check": true,
    102. "clusters": [
    103. {
    104. "Name": "test_cpp",
    105. "Type": "SIMPLE",
    106. "sub_type": "",
    107. "lb_type": "LB_ROUNDROBIN",
    108. "MaxRequestPerConn": 0,
    109. "ConnBufferLimitBytes": 0,
    110. "circuit_breakers":[
    111. {
    112. "priority":"default",
    113. "max_connections": 1024,
    114. "max_pending_requests": 1024,
    115. "max_requests": 1024,
    116. "max_retries": 3
    117. }
    118. ],
    119. "health_check": {
    120. "protocol": "SofaRpc",
    121. "timeout": "90s",
    122. "healthy_threshold": 2,
    123. "unhealthy_threshold": 2,
    124. "interval": "15s",
    125. "interval_jitter": 0,
    126. "check_path": ""
    127. },
    128. "spec": {},
    129. "hosts": [
    130. {
    131. "Address": "11.166.22.163:12200",
    132. "Hostname": "downstream_machine1",
    133. "Weight": 1,
    134. "MetaData": {
    135. "stage": "pre-release",
    136. "version": "1.1",
    137. "label": "gray"
    138. }
    139. }
    140. ],
    141. "LBSubsetConfig": {
    142. "FallBackPolicy": 2,
    143. "DefaultSubset": {
    144. "stage": "pre-release",
    145. "version": "1.1",
    146. "label": "gray"
    147. },
    148. "SubsetSelectors": [
    149. [
    150. "stage", "type"
    151. ],
    152. [
    153. "stage", "label","version"
    154. ],
    155. ["version"]
    156. ]
    157. }
    158. }
    159. ]
    160. }
    161. }