Unable to read data from API due to Private IP Restriction
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2024 12:24 AM
I have data in my API Endpoint but am unable to read it using Databricks. My data is limited to my private IP address and can only be accessed over a VPN connection. I can't read data into Databricks as a result of this. I can obtain the data in VS Code by using the same code, which runs locally and establishes a VPN connection when accessing data. I can't access the data even with a VPN connection because Databricks is a cloud service. I'm getting a connection timeout error. I'm currently using Databricks Free tier; is there a way for me to resolve this problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2024 01:00 AM
Hi AravindNani
This is more of infrastructure questions, you have to make sure that:
1) Your databricks Workspace is provisioned in VNET Injection mode
2) Your VNET is either peered to "HUB" network where you have S2S VPN Connection to API or you have to configure VPN tunnel on VNET where you provisioned databricks.
3) Use normal cluster (not serverless)
Test your connection by running command in notebook
%sh nc -zv <your_API_Endpoint_IP> <port>
If you want to use api friendly name (FQDN) you will have to deal with DNS resolution.
There is article that explain it:
https://learn.microsoft.com/en-us/azure/databricks/security/network/classic/on-prem-network
----
There are few alternative for that :
- you have to setup Static Egrees public IP from Databrick (e.g. NatGW) and whitelist it on your API side
- if your API is cloud base, you can try to setup private link or service connection.