Azure Arc- Data services
Azure Arc enable to us manage VM's, Kubernetes, SQL and Data services of Azure deployed to any cloud or data center in a consistent way from azure portal and also enforce compliance across all these services. More details can be found here.
In this article, we will look at Azure arc - Data services which includes the Azure SQL managed Instance and Azure PostgreSQL Hyperscale which can run on any Kubernetes cluster on any cloud and data center.
Installing of these services is very well documented and can be found here.
After the installation, we can verify that the azdata commands abstracts the installation of sql server, sql databases, metrics and logs by creating the pods, statefulsets and PVC as shown.
We can access the SQL server using the azure data studio as shown.
Following are some of the benefits these services provides are
- Azure SQL managed instance - Scale out option like in cloud where in once the instance is added with additional capacity in terms of CPU and memory, the same should be available to the pod.
- Azure PostgreSQL Hyperscale - This provides the feature to scale the Relational DB horizontally by adding additional nodes
Lets look at the Azure PostgreSQL Hyperscale scaling by first creating a Azure PostgreSQL Hyperscale instance by running the command.
azdata arc postgres server create -n postgres01 --workers 2 --storage-class-data managed-premium --storage-class-logs managed-premium --storage-class-backups managed-premium
Verify the instllation of postgres nodes by running the command as shown below.
SELECT * FROM pg_dist_node;
To scale the nodes horizontally, we can run the below command.
azdata arc postgres server edit -n postgres01 -w 4
We can verify the number of nodes as shown below. We can also run few SQL query and see that the execution time of the queries has reduced after scaling the nodes.
SELECT * FROM pg_dist_node;
We saw how azure services can be used across various clouds and data center . These services are still in preview and we can expect more azure services to be made available as part of azure arc.