Lob's website experience is not optimized for Internet Explorer.
Please choose another browser.

Arrow Up to go to top of page
Websocket.org Is Down, Here Is an Alternative
Engineering
December 3, 2021

Websocket.org Is Down, Here Is an Alternative

Author Avatar
by 
Sid Maestre

Since 2008, developers have learned about websockets from websocket.org. A site created by Kaazing who rode the HTML5 wave with an enterprise gateway and client libraries to enable web sockets and server sent events (SSE). Sadly, the site was shuttered sometime in 2021. We can assume along with Kaazing changing their name to Tenefit a new strategy was formed that did not include websocket.org.

Shutting down websocket.org also discontinued their echo server used by many developers to explore websocket tools and client libraries. By establishing a connection to echo.websocket.org developers could send a message and have it echoed back. Similar to httpbin.org used when testing REST API calls.

As my hacktoberfest project, I thought it would be fun to recreate echo.websocket.org. In this post I’ll share how you can stand up your own echo server locally or deploy it to Heroku. You’re also welcome to use ours at echo.websocket.events.

Huge thank you James Harris for open sourcing his echo-server project.

Run echo-server locally with docker

You have a few options for running it locally, I’ve found using Docker to be straightforward. First, if you don’t have Docker installed, then download it now. If Docker is installed check that it is running.

Use this command to run the latest available container

`docker run --detach -p 10000:8080 jmalloc/echo-server`

Confirm echo-server is running by pointing your browser to.

http://localhost:10000/.ws

You’ll see an interface where you can send a message and have it echoed.

Websocket.org Is Down, Here Is an Alternative image 2
echo-server browser interface

In Postman, you can create a new websocket request

Websocket.org Is Down, Here Is an Alternative image 3


Enter the server url localhost:10000 (without the “http://”). Click connect and enter a New message and click send to see it echoed.

Websocket.org Is Down, Here Is an Alternative image 4


Curious what this looks like in Docker? Click on your running container to see the logs.

Websocket.org Is Down, Here Is an Alternative image 5

Deploy echo-server on Heroku

You may want to deploy the echo-server project to Heroku but find that it requires go version 1.17. We’ve forked the echo-server project and updated it to version 1.17 and included metadata for Heroku deployment.

Websocket.org Is Down, Here Is an Alternative image 6


Start here and click “I’m ready to start” and install Heroku’s CLI for your OS.

Websocket.org Is Down, Here Is an Alternative image 7


Once installed, open your Terminal app,

Clone our fork of the echo-server repository.

`git clone https://github.com/lob/echo-server.git`

Change into the repository directory

`cd echo-server`

Login to Heroku

`heroku login`

You’ll be prompted to hit any key and a browser will open so you can login to Heroku.

Websocket.org Is Down, Here Is an Alternative image 8

Create a Heroku app with the command

`heroku create`

Now deploy the echo-server

`git push heroku main`

Once the deployment is done - open the app with

`heroku open`

Modify the URL in the address bar of your browser by adding /.ws at the end of your URL.

You’ll see the same interface displayed when we ran echo-server locally with docker. Post a message and it will be echoed back to you.

Websocket.org Is Down, Here Is an Alternative image 9

Conclusion

Even though echo.websocket.org is no longer available, you have options when testing and building apps using websockets.

  1. Use echo.websocket.events
  2. Run echo-sever locally with Docker
  3. Deploy echo-server on Heroku or other cloud infrastructure

You might also be interested in

How Docker memory works and finding a hidden hapi vulnerability

Continue Reading