{
"servers": [
{
"default_log_path": "/home/admin/mosn/logs/default.log",
"default_log_level": "DEBUG",
"graceful_timeout": "10s",
"Processor": 1,
"listeners": [
{
"name": "egress_sofa",
"address": "0.0.0.0:12220",
"bind_port": true,
"filter_chains": [
{
"match":"",
"tls_context":{
"status": true,
"inspector": true,
"server_name": "hello.com",
"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+hcy7lLF8QcPlsiH32SnLFg5LPy4prz71mebUchmt97t4T3tSWzwXi8job7Q2\nONYc6sr1Lv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OFK6Q0nqCJhcEcKzT/Xfkd+h9XPACjOObJh3a2+o\nwg9GBFECgYEA2a6JYuFanKzvajFPbSeN1csfI9jPpK2+tB5+BB72dE74B4rjygiG\n0Rb26UjovkYfJJqKuKr4zDL5ziSlJk199Ae2f6T7t7zmyhMlWQtVT12iTQvBINTz\nNerKi5HNVBsCSGj0snbwo8u4QRgTjaIoVqTlOlUQuGqYuZ75l8g35IkCgYEAyWOM\nKagzpGmHWq/0ThN4kkwWOdujxuqrPf4un2WXsir+L90UV7X9wY4mO19pe5Ga2Upu\nXFDsxAZsanf8SbzkTGHvzUobFL7eqsiwaUSGB/cGEtkIyVlAdyW9DhiZFt3i9mEF\nbBsHnEDHPHL4tu+BB8G3WahHjWOnbWZ3NTtP94MCgYEAi3XRmSLtjYER5cPvsevs\nZ7M5oRqvdT7G9divPW6k0MEjEJn/9BjgXqbKy4ylZ/m+zBGinEsVGKXz+wjpMY/m\nCOjEGCUYC5AfgAkiHVkwb6d6asgEFEe6BaoF18MyfBbNsJxlYMzowNeslS+an1vr\nYg9EuMl06+GHNSzPlVl1zZkCgYEAxXx8N2F9eu4NUK4ZafMIGpbIeOZdHbSERp+b\nAq5yasJkT3WB/F04QXVvImv3Gbj4W7r0rEyjUbtm16Vf3sOAMTMdIHhaRCbEXj+9\nVw1eTjM8XoE8b465e92jHk6a2WSvq6IK2i9LcDvJ5QptwZ7uLjgV37L4r7sYtVx0\n69uFGJcCgYEAot7im+Yi7nNsh1dJsDI48liKDjC6rbZoCeF7Tslp8Lt+4J9CA9Ux\nSHyKjg9ujbjkzCWrPU9hkugOidDOmu7tJAxB5cS00qJLRqB5lcPxjOWcBXCdpBkO\n0tdT/xRY/MYLf3wbT95enaPlhfeqBBXKNQDya6nISbfwbMLfNxdZPJ8=\n-----END RSA PRIVATE KEY-----\n",
"verifyClient": true,
"cipherSuites": "ECDHE-RSA-AES256-GCM-SHA384",
"ecdhCurves": "P256"
},
"filters": [
{
"type": "proxy",
"config": {
"DownstreamProtocol": "SofaRpc",
"Name": "proxy_config",
"SupportDynamicRoute": true,
"UpstreamProtocol": "SofaRpc",
"VirtualHosts": [
{
"Name": "sofa",
"RequireTls": "no",
"Domains":[
"*testwilccard"
],
"Routers": [
{
"Match": {
"Headers": [
{
"Name": "service",
"Value": "com.alipay.rpc.common.service.facade.pb.SampleServicePb:1.0",
"Regex":false
}
]
},
"Route": {
"ClusterName": "test_cpp",
"MetadataMatch": {
"filter_metadata": {
"mosn.lb": {
"version":"1.1",
"stage":"pre-release",
"label": "gray"
}
}
}
}
}
]
}
]
}
}
]
}
],
"stream_filters": [
{
"type": "healthcheck",
"config": {
"cache_time": "360s",
"cluster_min_healthy_percentages": {
"local_service": 70
},
"passthrough": false
}
}
],
"log_path": "/home/admin/mosn/logs/egress.log",
"log_level": "DEBUG",
"access_logs": [
{
"log_path": "./access_egress.log",
"log_format": "%StartTime% %RequestReceivedDuration% %ResponseReceivedDuration% %REQ.requestid% %REQ.cmdcode% %RESP.requestid% %RESP.service%"
}
],
"disable_conn_io": false
}
]
}
],
"cluster_manager": {
"auto_discovery": true,
"registry_use_health_check": true,
"clusters": [
{
"Name": "test_cpp",
"Type": "SIMPLE",
"sub_type": "",
"lb_type": "LB_ROUNDROBIN",
"MaxRequestPerConn": 0,
"ConnBufferLimitBytes": 0,
"circuit_breakers":[
{
"priority":"default",
"max_connections": 1024,
"max_pending_requests": 1024,
"max_requests": 1024,
"max_retries": 3
}
],
"health_check": {
"protocol": "SofaRpc",
"timeout": "90s",
"healthy_threshold": 2,
"unhealthy_threshold": 2,
"interval": "15s",
"interval_jitter": 0,
"check_path": ""
},
"spec": {},
"hosts": [
{
"Address": "11.166.22.163:12200",
"Hostname": "downstream_machine1",
"Weight": 1,
"MetaData": {
"stage": "pre-release",
"version": "1.1",
"label": "gray"
}
}
],
"LBSubsetConfig": {
"FallBackPolicy": 2,
"DefaultSubset": {
"stage": "pre-release",
"version": "1.1",
"label": "gray"
},
"SubsetSelectors": [
[
"stage", "type"
],
[
"stage", "label","version"
],
["version"]
]
}
}
]
}
}