Layer7 API Management

  • 1.  websockets - server to client communication

    Posted Nov 18, 2015 02:27 PM

    Dear all,

    I have a working example of websockets and I have this weird issue whereby if I connect a client to the server directly, bidirectional communication is working perfectly, the client can initiate the communication with the server and the server can send messages to the client,

     

    when I use the Gateway with outbound url my websocket server, I can see that the client can connect to the socket via the gateway and can send as many messages that I want and they get processed by the policy as they should, but if I try the other way, then the server tells me that the client disconnected but on the client, I can see that I am still connected and if I send another message across then the server will register the connection of the client again,

     

    I have the same policy for the inbound and outbound settings,

    I have the correct url in the outbound settings

    there is no ssl or authentication involved at all

     

    The ssg logs record nothing, I have set an empty service (with a simple logging to distinguish which is called and if they are called) for both outbound and inbound and I noticed that the inbound service is used when the client sends the request and the outbound policy is used on the one from the server.

    I also put a message received global policy that captures the request to check what is passed and I noticed that if the server talks back with an empty message, the message is passed on, but if they server sends even a letter, the outbound service is not called at all and the message received policy is not triggered! but if the payload of the server is empty, then the global is triggered and the communication is passed on,

     

    Any ideas?

     

    Thanks



  • 2.  Re: websockets - server to client communication
    Best Answer

    Posted Nov 26, 2015 04:30 PM

    Hi, Maurizio.

     

    Please open a case with Support for this if you have not yet resolved the issue.

     

    --Gary



  • 3.  Re: websockets - server to client communication

    Posted Dec 13, 2016 09:36 AM

    Hi All,

    I'm also facing same kind of issue.

    From the client side i'm able to send message to the server through API gw, but when the server sends the message API gw has received, but the connection closes immediately.

    I used wireshark to see the message packets, message has been received as two packets.

     

    When i use a public echo service, it works fine.

    could you please suggest what am i missing?

     

    Thanks and Regards,

    Sathish.



  • 4.  Re: websockets - server to client communication

    Broadcom Employee
    Posted Dec 13, 2016 04:56 PM

    Hi sathish.santhosam,

    Please open a support ticket to ask for tactical websocket assertion.

    The default websocket from MAG is a bit out-of-date. 

     

    Regards,

    Mark