By using AWS re:Post, you agree to the Terms of Use

API Gateway Websocket - payload quotas


Hello folks, hope all of you are well!

I'm here in order to ask if someone know differences between

  • WebSocket frame size
  • Message Payload Size

I've found these field on this web page here is reported the AWS WebSocket quotas and limits, but is not clear to me what is the difference between " WebSocket frame size" and "Message Payload Size". Could you provide some examples?


1 Answer

Frames are defined by the WebSocket RFC. This is the way in which clients and servers exchange data. When you send a message it is encoded in a frame. If the message is > 32KB, it must be encoded in multiple frames.

profile picture
answered 6 months ago
  • Thanks for RFC reference. And how AWS treat frames >32KB? I found in AWS API Gateway quotas that max payload is 128Kbytes. I create a test web socket gateway and I send over it a packet composed exactly of 128Kbytes, and the communication was ok.

    So, AWS provide and integrated logic in order to handle multiple frame? Logic used in both direction (in and out from gateway)?

  • If I am not mistaken, the RFC covers that as well, i.e., how to break a large message to multiple frames.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions