2

I am able to proxy through to a regular rest service end point just fine. However, I am unable to establish a connection to a web socket resource.

  • possible duplicate of [Can I use socket.io on apigee APIS Proxies?](http://stackoverflow.com/questions/23441347/can-i-use-socket-io-on-apigee-apis-proxies) – brandonscript Jun 18 '14 at 21:32

3 Answers3

1

Apigee is pretty much set up for HTTP connections in the default proxy configuration. However there are two options for using Apigee to connect to web sockets:

node.js: set up a native node.js project in Apigee. This is separate from the standard proxy flow, but you can use socket.io and you can create asynchronous connections to multiple targets.

Java callout: in the Apigee Edge (commercial) version, you can make connections to just about anything over UDP or TCP.

Michael Bissell
  • 1,210
  • 1
  • 8
  • 14
1

As i understand this question, i think you want to connect to a "ws://custom host/url" - i.e you want use proxy websocket protocol instead of HTTP or HTTPS. I think this is not supported yet.

You can use Apigee Extension Policies to do the same. I am not sure if Java SE supports ws protocol, Java EE does. We support Java SE in Java callout - you might want check that. You can use other language support in Apigee to try out ws.

But i would like you ponder over a basic question - why proxy ws Websockets are meant for a full duplex dedicated pipe between server and client. Apigee Edge is really good a burst of short request - it can connection pool and multitask heavily. Websockets will nullify this. Websocket in my understanding is not meant to be used with any proxying solution, even plain proxy servers have issues with the protocol. Websocket is meant for exclusive interrupted communication between client and server.

Srikanth
  • 1,015
  • 12
  • 16
1

Apigee supports websocket, when creating a new api proxy you have to select the service as websocket service. Websocket apigee

Apigee ships two versions of the Edge Private Cloud: one that supports WebSockets and one that does not. If you want to use WebSockets, then you must install the correct version of Edge.

note:You do not define explicit resources in the API proxy.