Im building a website and I'm doing communication between backend and frontend with REST APIs. However, many of the endpoints exposed through this REST API will be selled to external clients, so I have built a ApiGateway with authorization through cognito to expose endpoints to external clients. Since this APIGateway will be consumed by external clients, this resource is public and is protected by a WAF and cloudfront distribution. How ever, my question is about comunication between backend and frontend since backend and front are in a private subnet, I have thought consume REST endpoints directly, by consume services using the application load balancer and not by the public apigateway because I think this will introduce ore complexity and latency (Apigateway is public). So, do you think this is good approach? (front end -backend comunication through the application load balancer without authorization beacuse are i a private subnet and i could control access using security groups and have a public api gateway only for external clients)
In the other hand, Im doing server side rendering in the first page load and nexts client side rendering. So I would like to know... how is the call of API in the client server rendering? request to the API is since client side to the front end and front end returns java script? or the html with contain endpoints of my bakend and send request direclty to my backend?,
Aucun commentaire:
Enregistrer un commentaire