Skip to content

peterj/api-aggregation-wasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Aggregation with Envoy & WASM

I'll try to build a simple API aggregation plugin for Envoy using WebAssembly (Wasm) as the extension mechanism.

What are we building?

If I make a request to /hello on the proxy, I want the proxy (or the extension) to make a call to:

  • GET host1 /one
  • GET host2 /two

Combine (or aggregate) the responses from those two endpoints and then return that response.

We make request to /hello --> Proxy makes requests to /one and /two --> Proxy aggregates the responses and returns it to the client.

GET /hello --> [{ "value": "one" }, { "value": "two"}]
/one --> { "value": "one" }
/two --> { "value": "two" }

Configuration

[{
    "path": "/",
    "upstreams": [
        {
            "clusterName": "httpbin",
            "path": "/ip"
        },
        {
            "clusterName": "httpbin",
            "path": "/headers"
        }
    ],
}]

TODOs

  • Scaffold the basic Wasm extension project
  • Create (aka re-use) the Makefile for building the Wasm extension
  • Implement calling multiple upstream services from the Wasm extension & aggregating the responses in some way
  • Make the extension configurable with the upstream services to call and the aggregation strategy
  • Add authority and method to the configuration
  • Properly aggregate the responses

About

API aggregation with Envoy & WASM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published