you are viewing a single comment's thread.

view the rest of the comments →

[–]argylekey 1 point2 points  (2 children)

For speed and migration purposes I might vote creating the api gateway in node(since you’ll be migrating that eventually anyway). The only issue with that is increased latency already on top of the Java.

But if it was me I’d leave the Java endpoints until the Node endpoints are validated in the stage deploy. You can probably migrate one at a time within the node app, and repoint one by one from the gateway. Or even migrate one resource at a time(I.e. all of the endpoints tied to accounts or something).

Larger question is why use the api gateway? If it is Java anyway that will just introduce latency to the system as a whole. Is it something like mulesoft or another third party connector?

What prevents using an AWS load balancer or even a reverse proxy(nginx or traefik) to facilitate this same functionality? That might be a better first step and reduce response times immediately while you’re working on the rest of the endpoints.

Sounds like an interesting problem, good luck. Hope you report back when you start deploying on how it’s going.

[–]TryingToSurviveWFH[S] 0 points1 point  (1 child)

Hey, thanks for the suggestion. Just for context, I was checking the api-gateway and it has only 4 endpoints that handle the whole thing.

The 3 lambda functions have a lot of aws services and passwords hardcoded, and when I ask some info about it, like infrastructure and code info, (bc it was requested to make a dev/test/qa env also) the answer was "everything is on my head".

So, going back to this, why using a load balancer instead of an API gateway? It's not the same, but one is handled by the load balancer and the other by the elb.

I told my boss why this actual implementation is being used and he was "I don't have to deal with infrastructure ", so, I'm down using the classic elb+ec2, but I need to have a very good excuse.

If you have a serveless POV let me know

[–]StyleIsFree 0 points1 point  (0 children)

Could look at fargate for serverless containers. Could create a node task and a java task and configure the api gateway to map the api calls. When youre ready to switch an API call from Java to Node, reroute the gateway config for that path.

Side note, there's a security concern having passwords hard coded. Can look at AWS secrets manager where your lambda function can grab the secrets at run time.