Access local data from Azure Virtual Machine

Copper Contributor

Hello, 

My first time here so be nice ; )

When i deploy WebApps i use a Hybrid Connection to access onprem databases.

But now i need to install a Windows Service on a virtual machine, and still want to connect to my local databas server. Having trouble figuring out the best way, i would prefere not to setup a private VPN between Azure and my local network (Going to deploy a couples of customers).

 

- Hybrid Connection, not working only for WebApp?

- On-premises data gateway, not for Virtual machines?

- VPN (Feels like overkill)

 

What do you recommend? 
Or can i run a Windows service as App for something in Azure? Please point my in the right direction ;)

6 Replies
Hello,
Could please clarify the following.
Where you are planning to host the windows service - Azure VM or onprem VM?
What the service will do?
With whom the service will interact - you app or dB?

The service get into the VM on Azure, and fetch data from my local database.
If you want to securely access your onprem database from a service running on Azure VM directly, the best option is to setup a private connectivity between your Azure vnet and onprem network. You can achieve this via s2s vpn or Express Route.
Now, if you don't want to setup vpn/Express Route, I see the following two options:
You have to see if the function of your Windows service can be replaced by a suitable PaaS services to use a onprem data gateway to securely access the onprem data over the internet.
Or,
You can use Azure Data Factory Integration Runtime to securely move your onprem data to a blob storage or Azure SQL dB then setup your Windows service to access the data from there.
Hope this helps.

Thanks,
Rohan

Thank you,

 

Should be nice if everything can be done from the OnPrem server (dont want to involve opening port eg in the firewall). Are there any reason that Hybrid Connection can't be used?

 

Never tried a Express Route have to google VPN vs Express Route. 

Can't move the data because of local country laws (It's fine to view but not store in my case).

 

My service are used to fetch data from some third part API, not sure if you can do that with some "suitable PaaS services". 

Previously you said your service fetch data from the local database and now you are saying the service is used to fetch data from some third part API. ;)
If the first one is true, you can simply try using Azure "Function App" to connect to your local sql db via hybrid connection.
If the latter is true, you can try using "Logic App", you should be able to connect to any API by configuring a custom connector. You can also connect logic app to your local sql server via an onprem data gateway as well.
So, I would explore Function App and Logic App and see which one suits the best to meet the requirement.
Hope this helps, please let me know if you have any further query.

Thanks,
Rohan



Thank you, i did not provid you with all information the flow is the following:

 

1. Fetch data from external API.

2. Import it into the local database (and process it)

3. Then display the processed data on the web again.

 

Going to look into Function App, and Logic App ;)