Trying to securely bridge your Roboflow Inference with exterior companies with out exposing it to the vulnerabilities of the open Web? In that case, you are in the appropriate place. Within the fast-paced world of Machine Studying and Pc Imaginative and prescient, guaranteeing safe and environment friendly deployment is essential.
This text will demystify the function of the Roboflow License Server, clarify why community isolation is helpful, and information you thru organising your personal safe atmosphere.
We are going to speak about:
- What the Roboflow license server is
- What DMZs and proxies are
- How you can arrange a Roboflow license server
What’s the Roboflow License Server?
A License Server acts as an middleman between your Inference Server and the exterior companies with which the server must work together.
Within the context of Roboflow, the License Server performs the function of a proxy that forwards requests and responses between your Inference Server, and Roboflow APIs, and your mannequin weights.

A license server provides an additional layer of safety by stopping direct communication between the Inference Server and the exterior world. For corporations that want to stick to strict knowledge dealing with and compliance insurance policies, isolating the Inference Server is usually a requirement.
Moreover, a license server means that you can management what knowledge goes out and in, supplying you with an added measure of management over the info circulation.
What’s a DMZ (Demilitarized Zone)?
A Demilitarized Zone (DMZ), talked about within the license server graphic above, serves as a sub-network that exposes a corporation’s external-facing companies to an untrusted community, usually the Web.
DMZs isolate companies that work together with the exterior world from those who shouldn’t, like your Inference Server. A license server is usually positioned within the DMZ in order that it will probably safely work together with each inner and exterior companies whereas conserving your delicate servers safe.
What’s a Proxy?
A proxy server is an middleman that sits between a shopper (which may very well be a consumer’s laptop, or an Inference server in our case) and a server (like an internet site or an API service). The first function of a proxy is to ahead requests and responses between the 2.
How Does a Proxy Work?
Let’s break down the workflow of a proxy, step-by-step:
- Request Forwarding: When a shopper desires to entry a useful resource (e.g., an API endpoint), it sends the request to the proxy server.
- Processing: The proxy evaluates the request based mostly on pre-defined guidelines, which may contain filtering content material, caching knowledge, or altering the request.
- Forwarding to Server: The proxy then forwards the modified (or unmodified) request to the focused server.
- Response Dealing with: After receiving the response from the server, the proxy might once more filter, cache, or modify the info.
- Returning to Consumer: Lastly, the proxy sends the response again to the shopper.
Why Use a Proxy?
There are numerous the explanation why chances are you’ll wish to use a proxy. These embrace:
- Safety: A proxy can filter out malicious visitors and act as a defend to your inner community.
- Anonymity: By routing visitors by means of a proxy, the exterior server solely sees the proxy’s IP tackle, not the shopper’s.
- Load Balancing: Proxies can distribute incoming requests throughout a number of servers, guaranteeing that no single server is overwhelmed.
- Knowledge Caching: Regularly accessed knowledge will be cached by the proxy to hurry up future requests, bettering efficiency.
- Entry Management: Proxies can block unauthorized entry to sure web sites or sources based mostly on IP addresses, protocols, or different standards.
Within the context of a license server, it acts as a specialised proxy that forwards requests and responses between your remoted Inference Server and exterior companies like Roboflow’s APIs. This setup means that you can hold your Inference Server securely tucked away behind a firewall whereas nonetheless being able to work together with needed exterior companies.
How-To: Setting Up Your License Server
On this part, we’ll stroll you thru the right way to arrange a Roboflow license server.
Earlier than diving into the setup, be sure you have the next:
- A Machine with Web Entry: This machine will host the License Server and should have entry to
https://api.roboflow.com
andhttps://storage.googleapis.com
. - Docker Put in: The License Server will run in a Docker container.
- Community Permissions: Guarantee you have got the mandatory permissions to change firewall guidelines and different community settings.
With out additional ado, let’s get began!
Step #1: Pulling the Docker container
First, open a terminal and run the next command to drag the License Server Docker container:
sudo docker pull roboflow/license-server
This can obtain the mandatory Docker picture to your machine.
Step #2: Working the License Server
As soon as the Docker picture is pulled, run the next command to begin the License Server:
sudo docker run --net=host roboflow/license-server
The --net=host
flag ensures that the Docker container makes use of the host machine’s community, making it simpler to route visitors.
Step #3: Configuring the Inference Server
Now, you will must configure your Inference Server to make use of this License Server. To do that, go the IP tackle of the License Server as an atmosphere variable when operating the Inference Server Docker container:
sudo docker run --net=host --env LICENSE_SERVER=your_license_server_ip roboflow/inference-server:cpu
Change your_license_server_ip
with the precise IP tackle of your License Server.
Step #4: Community Concerns
Be sure to replace your firewall guidelines to permit outgoing connections to https://api.roboflow.com
and https://storage.googleapis.com
, and incoming connections on port 80.
As well as, be certain that the DNS settings enable the machine to resolve domains, particularly for api.roboflow.com
and storage.googleapis.com
.
How-To: Checking and Debugging Connectivity
As soon as you have arrange your License Server and Inference Server, the following step is to confirm that the servers can talk as supposed. This part will information you thru varied strategies to verify and debug your community connectivity.
Guaranteeing correct connectivity isn’t just a one-time setup step; it is a steady requirement for troubleshooting and upkeep. With out verified connections, you threat operating into varied operational points, from delayed knowledge processing to finish service outages.
A number of instruments may help you verify totally different facets of connectivity. Let’s delve into some standard ones.
Utilizing curl
for HTTP Checks
The curl
command-line instrument means that you can verify for HTTP/HTTPS connectivity. It might even show the standing code for you, indicating whether or not the request was profitable or not.
For instance, the next command permits you to verify you possibly can connect with api.roboflow.com
. The command ought to show a HTTP/2 200
within the first line of the response. When you see a community error, your laptop can not connect with the web site you have got specified.
curl -I https://api.roboflow.com
Utilizing ping
ping
is a wonderful instrument for primary community diagnostics. It might let you know whether or not a specific area or IP tackle is reachable. The next instance permits you to verify if api.roboflow.com
is reachable.
ping -c 1 api.roboflow.com
Utilizing telnet
or nc
for Port Checks
telnet
and nc
(netcat) allow you to verify if particular ports are accessible. You should utilize them to check if a selected port on a server is open.
Right here is an instance utilizing nc
:
nc -zv your_server_ip 80
Automating Community Checks
To automate these checks, you should utilize a Bash script. This lets you run all of the assessments with a single command and will be particularly helpful for routine checks or as a part of a debugging workflow. Under is an instance bash script that you should utilize.
Create a brand new file in your laptop and name it check_connectivity.sh
. Then, copy the under code into the brand new file.
#!/bin/bash
# Bash script to verify connectivity for Roboflow License Server # Operate to check HTTP/HTTPS connectivity
check_url() { url=$1 status_code=$(curl -o /dev/null -s -w "%{http_code}n" -L "$url") if [ "$status_code" == "200" ]; then echo "----------------------------" echo "Success: Capable of attain $url" elif [ "$status_code" == "400" ]; then echo "----------------------------" echo "Success: Acquired 400 - $url seemingly nonetheless be reachable however the server could not perceive the request." else echo "----------------------------" echo "Failed: Unable to achieve $url. HTTP Standing Code: $status_code" echo "Potential Causes: Firewall guidelines, Community points, or the URL is likely to be down." fi
} # Operate to check port connectivity
check_port() # Verify for command line argument for inference_server_ip
if [ "$#" -ne 1 ]; then echo "Utilization: ./check_connectivity.sh <inference_server_ip>" exit 1
fi inference_server_ip=$1 # Verify HTTP/HTTPS connectivity
check_url "https://api.roboflow.com"
check_url "storage.googleapis.com" # Verify port connectivity
check_port "$inference_server_ip" 80
The above code is a Bash script that checks the required connectivity. It assessments entry to https://api.roboflow.com
and https://storage.googleapis.com
in addition to port 80 on the Inference server. The script outputs whether or not every stage is profitable or failed, together with attainable causes for failure.
Subsequent, open a terminal and navigate to the placement the place you saved the script. Then, make the script executable utilizing the next command:
chmod +x check_connectivity.sh
Lastly, you possibly can run the script utilizing the next comamnd:
./check_connectivity.sh <inference_server_ip>
Change <inference_server_ip>
with the IP tackle of your Inference Server.
If every part is setup correctly, the output ought to look one thing like this:
----------------------------
Success: Capable of attain https://api.roboflow.com
----------------------------
Success: Acquired 400 - storage.googleapis.com seemingly nonetheless be reachable however the server could not perceive the request.
----------------------------
Success: In a position to connect with 10.195.184.123 on port 80
If you don’t see a profitable response for any of the requests within the script, listed below are some widespread points chances are you’ll encounter with some context that can assist you debug the issue:
- Standing Code 400: This normally means the server could not perceive the request. Nevertheless, it might nonetheless point out that the server is reachable.
- Ping Fails: If
ping
fails however different checks go, ICMP packets is likely to be blocked by your firewall. - Port Inaccessible: If you cannot entry a port, guarantee it is open on the firewall and that the service is operating.
Ultimate Ideas
Establishing a license server accurately is a crucial part for the safe and environment friendly operation of your companies. The server acts because the gatekeeper, guaranteeing that your Inference Server can safely work together with the exterior world whereas being shielded from potential threats. Therefore, taking the time to arrange and confirm your license server is a crucial requirement.