-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
Some filters may need to use huge config data. For example, grpc-json transcoder filter (https://envoyproxy.github.io/envoy/configuration/http_filters/grpc_json_transcoder_filter.html), needs to use a huge descriptor data.
This config data could not be read from file if LDS is used since LDS could not use file. It is not good idea to embed these huge config data in the LDS payload either. 1) It will slow down the refresh. 2) not easy for human to read LDS config.
It is better to load these huge config data separately. Until all these data are loaded, LDS processing can start.
Here is an idea, add a "blob_store" section as following in the LDS payload
"blob_data": {
"data1": "/data1_path/v1", # URL path to fetch the data.
"data2": "/data2_path/v2"
}
The URL paths will use the same protocol and host as LDS service. LDS api will load the LDS first, subsequently, load all blob data. Then start to process LDS.
In the filer config. These data can be refereed as
{
"type": "decoder",
"name": "mixer",
"config": {
"proto_descriptor_pb": "blob_data.data1",
...
}
},
The filer config code will get data stored in blob_data by calling some functions. In this case, the filter see the value is prefixed with "blob_data.", it will get the data "data1" from blob store.