What this pattern does:

This example showcases communication between a WASM filter and a service via shared queue. It combines the Singleton HTTP Call and TCP Metrics examples. The filter collects metrics and enqueues it onto the queue while the service dequeues it and sends it to upstream server where it is stored.

Build and Deploy:

cd metrics-store make run-filtered

Test this filer by executing:

# make a few of these calls curl 0.0.0.0:18000 -v -d "request body"
# Retrieves the stored stats curl 0.0.0.0:8080/retrieve -v x | y | z === # x : downstream bytes, # y : upstream bytes, # z: the latency for application server to respond

Collects simple metrics for every TCP packet sent, and logs it down.

Caveats and Consideration:

Potentially log large files depending upon volue of traffic handled.

Compatibility:


Recent Discussions with "meshery" Tag