2

Our deployment is currently running on an ECS cluster with multiple Fargate tasks without any problem. The deployment diagram is given here. There are four different services (only one of them is shown in the diagram) and each service has 2 containers for now.

One of the services, written in Spring Boot framework, includes both REST and WebSocket (without STOMP). When we deploy this service in Elastic Beanstalk as itself only, we can build both REST and WebSocket connections. For example, when we call ws://api_link/other-path-variables, related WebSocket connection is opened successfully. However, when it is deployed on ECS cluster, we can not build a WebSocket connection through API Gateway(REST) shown in the diagram.

  • Do we have to create a new API Gateway for WebSocket API? If yes, then we are not able to match route keys such $connect with our current WebSocket API. Since, we have only one connection URL, such ws://api_url/task-id, supporting different connection based on task-id. How can we configure it to just open only a connection through api gw?

  • We also tried the solution here by creating an extra target group but it did not work. We were not able to make a websocket connection through a browser websocket client using the existing API Gateway.

kundilcas
  • 65
  • 6

0 Answers0