I'm new to Azure, and a little confused about cloud services.
I'm making a Testing Environment that consist of multiple instances (of the same VM) where each instance has a REST API server (Consisting of 2 API functions: GetResults, SendFileForTesting) and a load-balancer that distributes the requests upon the VMs.
In each VM there is also a worker that processes the received files and saves the results in a shared DB.
The goal is, for the file processing to be distributed on the available VMs and the results to be saved in a shared place (So that the "GetResults" request would send all of the results to the client)
This is how it looks:
[LoadBalancer]
|
[Multiple VM nodes] - (API: GetResult, SendFileForTesting)
|
[Shared Result DB]
The question is, what is the best way to deploy this on azure?
Right now, I'm trying to create a load-balancer that has 3 clones of the same VM with the same REST API server and another VM that holds the shared DB.
Is there a better way to do this?
Thanks
In my opinion, I think VMSS is the best way to deploy it.
First, create two Azure VM, one is shared DB, another one is API server. configure API server to connect to shared DB. then capture this VM. After capture completed, we can use template to deploy a VM scale set with this image.
More information about create custom image, please refer to this link.
More information about use template to create VMSS with custom image, please refer to this link.
(this template LB rules is port 80, if you need more ports, please edit this template)
Related
I am sorry if my question is very general - I just started with azure...
We are working with Azure and we currently have only one VM.
I would like to add a second VM and to place them both under the same availability set. The thing is that using our APP our users are posting files to the server and then a third party (twilio) should read the files. I need the two servers to be sync immediately to make sure the files are exists in both server.
Is it possible?
I be happy to get the outlines of how this should be done.
You can use azure files and attach it to both machines and store your files over there
Availability sets have nothing to do with VM syncing; it's about ensuring your VMs aren't upgraded at the same time or placed all in the same physical location.
You'll need to store your uploaded outside of your VMs in a common area (whether in blobs, or an Azure File share, or even in a database). Otherwise, you'll need to create your own way of syncing (copying) content between your VMs.
There's no right way to store your data, and the options I listed each have their pros and cons. You'll need to choose what's right for your app.
I'm thinking about setting up 2 web VMs with a load balancer and availability set, and another VM for SQL server (not sure if I can set an availability set for a SQL Server as well - SQL Server Express / Standard?)
My main problem is how to keep both web servers in sync (prefer not to use the DFS) or having the files in more than one location...
Another issue - is user uploaded content that I want to be available in both web servers (I wonder if I can also direct cache objects to be saved on a specific storage disk)
So, I was thinking to setup a storage account and attach it to both web VMs for user uploaded content and images while each server still serve it's own separate web application with same shared access to content files...
Is that a good idea? I understand that Azure storage is a virtual disk that is supposed to be highly available and fast - is it true??
Do I get a major performance hit if using the same storage disk from 3 different VMs (is that even possible?)
UPDATE:
I found out that because I'm using the BizSpark program I can't really connect more than one server - and share resources between them (unless I pay extra for it). so this became irrelevant for now
Also, I'm talking about ASP.NET but this shouldn't matter
Azure Files enables you to run multiple IIS instances against a single file share and thus not have to worry about replicating files across the multiple shares - so this is definitely an option. See Getting Started with File Storage for more information.
am new to windows azure. I recently set up a vm and host a website, according to the SLA i need to have 2 VMs in the availability set. Now i did set up the second VM.
My questions what do i need to use the second VM for?
if i setup load balancing does azure redirect user to the second VM? this second VM has nothing in it.
Please i will like to know this and is it possible to replicate the content of the first VM to the second one, so each time the first one is down the second VM can take over.
Thanks
At first, You must understand the statement of minimum two machines to get 99.95% SLA. It is not about "reserving" resources for use in case of fault or update (fault domain and update domain in availability set). Your application must be created as multi-tenant, so You need to run Your application on two servers, connected to the availability set. You can synchronize storage with GlusterFS (if You use Linux) or other distributed file system. You also can use Azure Files service (SMB as a service) to share storage. For sharing DB (in example MySQL) You need a cluster (independent or distributed through Your two machines).
So... You must to start think in "cloud way" instead of typical one VM administration.
I try to create a load test for a Azure hosted Web Service, but I am not able to connect to the Azure Cloud Service in order to collect the counters.
How can we connect to Azure cloud service from local machine or from any machine ?
I have tried to use the cloud service name, the VIP, but no luck.
Error: Cannot read counters from the machine 'xyz'.
Note: I am able to do RDC to the same cloud service.
If you would like to get performance counters from the machines you could configure Application Insights on your roles and collect them as part of your cloud load test.
http://blogs.msdn.com/b/visualstudioalm/archive/2014/04/07/get-application-performance-data-during-load-runs-with-visual-studio-online.aspx
This link would give you an idea on how to do it.
Let me know if you have more queries. Above link should also help you in getting help from the product team.
Thanks!
Ranga
Just came across this question -
this can be done by configuring the IP addresses of the Virtual machine instances of your webservice (webrole / worker role) - in the load test's performance counter collection section. Your load test controller would have to be in the same subnet as of your application as well. This will help collect all perfmon data (including application's custom performance counters).
I am trying to a deploy an app which has a frontend app and a backend worker. The worker runs a CPU intensive process. Now my requirements are to run the web app in a Azure A0 instance while the CPU intensive process runs in a D2 instance. Now both the instance must be able to share the files. I have read at places where they spoke of SBS.
I tried creating the linux VMs in same cloud services but couldnt figure out how to ssh into them separately since they use the same cloud service url. i followed this http://azure.microsoft.com/en-us/documentation/articles/cloud-services-connect-virtual-machine/
to create the 2nd vm.
Can anyone suggest me as how to achieve this setup? Also if possible how do i check if the disks are available to both the instances?
Azure docs aren't as helpful as aws. :(
If the two VMs just want to share files and you don't want to go to the extra effort of coding for blob storage then consider Azure Files which exposes an SMB share against a blob storage back end. This allows you to do standard file IO operations instead of custom blob storage code. See http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx which shows how to create the file share in Windows and Linux VMs.
[Probably easier to give an answer here]
BlobStorage is a universal storage container that can effectively act as the common drive you are looking for. Access to the blob storage container is made over HTTP / HTTPS either through a BlobStorage Client or over REST, where you will have functions to upload, download, list objects, etc.
For Python, you'll hopefully find this article sufficient although I've no experience with Python on Azure to comment, or if choosing REST and http requests - that should work fine.
HTH