Connecting to private or local databases from a cloud-based platform has historically been difficult, to say the least. You could manage VPNs, struggle with manual setups, or rely on third-party tunnels that weren’t built for databases. With our brand new Data Gateways, we have created a much simpler, much more focused solution.
It’s secure by default, easy to install, and it’s only goal is to let you work with your data securely, no matter where it lives.
What is a Data Gateway?
A Data Gateway is a specialized tunnel for databases. It securely connects your private or local database to Outerbase's cloud interface, allowing you to query, visualize, or manipulate your data without exposing it to the outside world.
Unlike generic tunneling solutions, this one is database-centric. It leverages WebSockets for low-latency communication and uses a local agent to manage the connection from your environment to the cloud. Once connected, the gateway enables seamless interaction with your database without requiring manual configurations like firewall rules or VPNs.
How Does It Work?
The setup is simple and works in three steps:
Install the Agent: Download and run our lightweight agent locally. This agent will manage the connection to your database.
Authenticate: Use a token to verify and secure the connection.
Connect: The agent establishes a WebSocket-based tunnel, allowing data to flow between your database and Outerbase securely.
Here’s the flow in action:
Client Requests: A request is sent from the cloud to your local database.
WebSocket Tunnel: The agent forwards the request through a secure WebSocket connection.
Response Handling: The database responds, and the agent sends the data back through the tunnel.
What is important to note here is that you control the flow of data entirely. No longer want to send data to Outerbase? Simply close the gateway, ready to start using Outerbase again? Open it back up! It’s simple, and it’s secure.
A Closer Look at the Technology
The Data Gateway uses WebSockets to create a bidirectional tunnel for communication. This provides several benefits:
Low Latency: WebSockets maintain a persistent connection, avoiding the overhead of HTTP requests.
Efficient Data Flow: With WebSocket streams, data flows continuously without interruptions, making it ideal for real-time applications.
Room Matching: Each connection is isolated using a “room” system, ensuring that data flows securely and predictably between endpoints.
This setup ensures a seamless connection between the local database and the cloud, with both ends continuously exchanging data.
Why Build a Custom Tunnel?
There are many tunneling solutions out there, but none are purpose-built for databases. Here's why the Data Gateway stands out:
Database-Centric: Unlike generic tunnels, this solution is optimized for the unique requirements of database traffic.
Simple Setup: No need to configure firewalls or IP whitelists—install the agent, and it just works.
Secure by Design: Each connection is authenticated with a token, and WebSocket streams provide secure data transfer.
We have tried many other solutions but they all fell short of our goal of being the best possible and most secure option for databases. That is why we felt it necessary to build our own.
Security Matters
Security is at the core of the Data Gateway:
Authentication: Tokens ensure that only authorized agents can establish a connection.
Isolation: Each connection is isolated using room-based matching, preventing data leakage between sessions.
Backpressure Control: Efficient buffering ensures stable performance under varying workloads.
The client is even open-sourced so you can fully inspect the code before you run anything on your machines, to give you that extra peace of mind.
Code Example: Creating a Gateway
It’s incredibly easy to set up, you simply create a Gateway in Outerbase and run either the shell or Docker command.
npx @outerbase/gateway
--id b38dc5e8-337f-5a99-1337-f71993af11a
--secret e1d3e489-10f1-8008-1335-42e069ef34b7
This function bridges your local database to the cloud, creating a secure and persistent WebSocket connection.
What’s Next?
We built Data Gateways to make connecting private databases to the cloud as painless as possible. Whether your database is on-prem, in a private cloud, or even running locally, Data Gateways simplify the connection process and lets you focus on your data.
To try it out, sign up for Outerbase today. Installation takes just a few seconds, and once it’s running, you’ll wonder how you managed your data without it.