Opinions Wanted: Now that we are using CDK/SST qui...
# help
d
Opinions Wanted: Now that we are using CDK/SST quite extensively…. a realization about APIGateway APIs has hit me. Many 3rd-Party constructs that handle one small piece of functionality and that need a gateway + lambda to work, often create that gateway and function in a silo (not adding to existing API) likely because they perform a very small task outside of the larger project. Eg. @cloudcomponents/cdk-contentful-webhook This is just a webhook that a app hits and not an end-user. I’m even noticing this within our own code; the desire to just keep APIs silo’d vs merging. Right now our platform stack has 4x APIs in it. So here is the question… which is the better practise? Are there certain scenerios where it does / doesn’t matter? Is there a performance hit at all?
t
We've seen people create one API and pass it around to other stacks to create routes in
d
Right, which works so long as all constructs allow for passing in. which I don’t think my example above does.
d
Is there a performance hit at all?
I wouldnt think so, APIG routing is pretty quick, and scales very high.
Are there certain scenerios where it does / doesn’t matter?
I think the only scenario where it would matter is with domain names. If you want a domain to be applied to an APIG, you will need everything in a single APIG. I cant think of any other scenario where it would matter off the top of my head.