Could Apigee Edge act as Websocket proxy for my clients?

Not applicable

Hi,

I have an application to which clients connect using websocket and then they exchange the messages over that websocket connection which remains persistent until the client closes it.

Now, I want to put Apigee Edge as a proxy in between the clients and the application.

Is that possible? So what that means is, from the Apigee proxy there would be a persistent Websocket connection to the application (lets call it ConnA) for each client and there would also be a persistent websocket connection between client and the Apigee proxy (ConnB). There would be 1:1 mapping between the ConnA and ConnB i.e. the messages exchanged by client with proxy over ConnB will be passed over ConnA to the application and vice versa i.e. messages pushed from application over the websocket connection will be delivered by proxy to the client.

Is this possible using Apigee gateway?

0 2 973
2 REPLIES 2

Nope. Apigee Edge does not act as a Websocket proxy.

This is not a real answer, but this is my attempt to thinking outside of the box on how to do a websocket connection using Apigee and I just feel like sharing it for fun with no profit.

Let's get the obvious out of the way: websocket to websocket does not work.

You could work around it with a simple API with a POST for communications to customers (including yourself). Of course, you would have to savvy with Java callouts to establish websocket connections and work with customers that may be concerned with making changes.

Something like https://mysite.com/api/v1/customers/{customerid}/message, where you provide a unique id to the customer and have one for yourself. They send a message to you with your customer id in the URI, you message them with theirs. With OAuth or API keys, you have identification of the sender.

Of course, that's an API solution for using an API management tool for websockets, but at least you can use Apigee!