Azure / azure-signalr-bench

Benchmark to evaluate performance of Azure Real-Time Services including Azure SignalR and Azure Web PubSub

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setup

Dependency

  1. WSL or Linux
  2. az cli [Version >=2.37]
  3. .NET 6 sdk
  4. A tenant you are allowed to register AAD applications
  5. jq , nodejs , npm, helm

To avoid dealing with those dependencies (except 4), you could use Azure Cloud Shell to run all the scripts. The dependencies have been installed in the Azure Cloud Shell env already.

In the Azure Cloud shell: Bash (Recommended ๐Ÿ˜€)

git clone --single-branch --branch v2 https://github.com/Azure/azure-signalr-bench.git

Use Azure Cloud Shell to init the resouces

Steps

SignalR performance tool uses AKS to run the tests. To setup the initial environment, you could run below script. ๐Ÿ˜ƒ Make the [prefix] unique. [location] is the region you put your resouces in like eastus.

โš ๏ธ Below init script will create resources and generate cost !

cd Initialize && chmod +x ./*.sh
./init.sh -p [prefix] -l [location]  ## This will take about 20 minutes

Grant permission to users/groups

  1. Assign the Contributor role to allowed users First find your service principle in your AAD Enterprise applications. Use your [prefix] to search the service principle

find-service-principle

Select the service principle and add user/group. This will determine who can access the test tool portal. 

You can come back and add more people later. Add yourself now.

Grant permission to user or group

  1. Modify the Azure AAD config (clientID and TenantID) in src/Pods/Portal/appsettings.json accordingly(Use the clientID and tenantID of the Application you just created).

After that, you need to init the deployments inside the aks

./publish.sh -p [prefix] -a #This will take about 20 minutes

Now everything is ready, you could go to the printed url to create performance tests! ๐Ÿ˜Š

FAQs

  1. Failed trying to add nodePool or setup aks. Failed to scale up VMs after starting a test.

VM quota issues: You need to change the VM size according to the quota in your subscription or request VM quota. The current used VM SKU is Standard_D4s_v3. You could also use other VM types. But make sure the VM type has at least 4 cores. The node pool could be added in the AKS node pool configration.

image

Outbound IP port issue: You need to add more ips to your load balancer if you trying to add a large node pool

  1. SSL cert not safe

NSG issue: If the NSG in the created AKS resource group blocks inbound traffic, the SSL certificate verification would fail.

  1. What's the portal domain? Run below command to get the urls

./publish -p [prefix]

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

About

Benchmark to evaluate performance of Azure Real-Time Services including Azure SignalR and Azure Web PubSub

License:MIT License


Languages

Language:C# 84.4%Language:Shell 15.6%