Search
  • Andree Toonk

Hello world! introducing mysocket.io




Hi there! And thanks for visiting this first blog post. Let me start by introducing myself. Mysocket is a service that provides users with fast and secure TCP sockets for services that aren’t normally directly reachable from the Internet. Using a simple client, we connect your local services to the Internet. We do this by using the mysocket anycast infrastructure. In just a few seconds, your service can be globally available. Mysocket supports a handful of socket types, of course, HTTP and HTTPS, but users can also get their own dedicated TCP ports, as well as an encrypted version using TLS.



Example use cases

What does that mean exactly, well let’s look at some basic examples. Perhaps you’d like to provide ssh access to your Raspberry Pi Lab setup at home or access your private EC2 instances behind NAT gateways.



Or maybe you have a web development project running on your laptop and would like to share your progress with your teammate or customer without having to deploy it somewhere other than your computer.


These are both typical use cases where mysocket can help. In both cases, the actual service is running on localhost and possibly even behind a nat gateway. Using mysocket, users get a public "socket", i.e., network port, connected via the secure tunnel back to the service running on localhost. So now, the service is instantly globally available!


How does it work

It’s pretty simple. Just check this quick demo video, in which I go over the main concepts, and create a socket from scratch.



If you’re interested or curious, feel free to give it a spin and let me know what worked or didn’t, or even better, how it can be improved. Getting started will take you just one minute, simply follow these four simple steps.


#Install the mysocketctl client

pip3 install mysocketctl

#Create account

mysocketctl account create \
    --name "your_name" \
    --email "your_email_address" \
    --password "a_secure_password" \
    --sshkey "$(cat ~/.ssh/id_rsa.pub)"

#login

mysocketctl login \
    --email "your_email_address" \
    --password "a_secure_password" \

#Launch your first global socket ;)

mysocketctl connect \
    --port 8000 \
    --name "my test service"
    

That's it' all! Now we made port 8000, listening on localhost, available to the Internet. By connecting the mysocket global anycast infrastructure to your local TCP service, we made your service globally available.


Built on Anycast technology

One of the cool things about this service is that it’s built on a global anycast network with 91 Points of Presence in 80 cities across 42 countries. This helps with improving the availability and performance of the applications that you offer to your global users. Mysocket.io application services connect to this anycast network using various servers in North America, Europe, and Asia. All this provides us with the best possible low latency user experience and Instant regional failover, which results in an incredible level of high availability. So no matter where you are, there’s always a mysocket entry point close to you, guaranteeing low latency, typically in under 10ms for north America and Europe.


But don't take my word for it. You can check this yourself by doing a ping test to api.mysocket.io from your laptop, or even better, test the socket you just created! The screenshot below is a ping test using locaping.com, from nodes worldwide to a mysocket service I created earlier. It shows an average round trip time between less than a millisecond to 12ms. That's pretty good!

Created using https://www.locaping.com/result/IO178Zkf

Documentation


One of my goals is to make Mysocket super easy to use. One way to do that is to have good documentation. I invite you to please check out our readthedocs.io documentation here:

https://mysocket.readthedocs.io/en/latest/


It’s divided into two sections:

  1. General information about mysocket.io and some of the concepts

  2. Information and user guides for the mysocketctl command-line tool.

The documentation and mysocketctl tool are both opensource so feel free to open pull requests or open issues if you have any questions.


More to come

This initial blog post is just a brief introduction. There’s a lot more to tell and plenty more geeky details to dive into. Don’t worry; that’s the plan for subsequent Blog posts soon. We’ll look at some more example use-cases and technical details.


Cheers

-Andree


646 views0 comments

© Mysocket.io