If I have multiple instances on Azure and a webapp which has a connection string with maxpool:
the connection string max pool * instance count should equal the max allowed in the SQL tier , right? or should I set the maxpool to be equal to max for the tier
Example: SQL with max connections if 2400
Instance count is 10
Should the connection string for the app has sql connection string 240 or 2400 to be within limits?
Thank you
The pool size is defined per instance (actually per process, you might have multiple web jobs running on the same instance). So, if you want to guarantee that you are always below the limit, you should divide total size on instance/process count, 240 in your example.
Related
I've red the documentation and searched the internet for a simple explanation on Azure application gateway auto-scaling and the above quoted line but failed.
It would be really helpful if you can explain/provide a explanation link related to the same for better understanding.
Thank you!
When you enable auto scaling you need to set a minimum and maximum instance count. How do you know how many instances you need to handle the minimum amount of traffic you want to be able to handle? That is where Capacity Units play a role:
Capacity Unit is the measure of capacity utilization for an Application Gateway across multiple parameters.
A single Capacity Unit consists of the following parameters:
2500 Persistent connections
2.22-Mbps throughput
1 Compute Unit
If any one of these parameters are exceeded, then another n capacity unit(s) are necessary, even if the other two parameters don’t exceed this single capacity unit’s limits. The parameter with the highest utilization among the three above will be internally used for calculating capacity units, which is in turn billed.
When configuring the minimum and maximum number of instances you can now calculate how many instances you need because a single instance can handle up to 10 Capacity Units, so for example a maximum number of 10 * 2500 = 25.000 persistent connections.
For example: if you expect to have to deal with 6000 persistent connections you will need at least 3 instances (3 * 2500 = up to 7500 persistent connections)
Azure Portal provides the ability to set the number of instances an app can scale out to. This is set by the Maximum Burst option in the Scale out tab:
Picture link since I can't post pictures yet
The maximum number of instances can be further be limited by the Maximum Scale Out Limit.
So, the question is, why and when should I put different values in those and what is the actual difference between those settings?
They all represent the maximum number of instances, but Maximum Burst represents the maximum number of instances that the plan can scale out, and Maximum Scale Out Limit represents the maximum number of instances that the current Function App can scale out.
If you set the maximum number of instances of the plan, then the maximum number of instances of your Function App cannot exceed the maximum number of instances of the plan.
we got a cosmos DB containing 24 containers as of now.
The throughput is provisioned on database Level.
I would expect the Minimum throughput to be 2400 RUs but actually 4500 is expected. (Shown in Azure Portal as well as an error message in .NET SDK)
Expectation:
Count of containers * 100 RU/s = Min. RU/s
or if container count is less or equal to four
400 RU/s
I observed the behaviour, that after I delete the database and recreate it, the throughput works as expected.
This behaviour only occurs after some days working with the database.
Is there an explanation why this is expected or is this a bug in
CosmosDB itself?
Thanks for your help
You have two regions configured, per your screenshot:
Each region is consuming the 2400 or so RUs. 2x2400 = 4800. Seems like you have slightly less than 2400 RU per region.
In any case: the two-region setup is what's costing you double the expected RU.
Is there a way to limit number of connections per host in cassandra cluster and based on what parameter this is calculated?
In some of cassandra node i can see established connections count for 9042 goes up to 1400+, is this something i need to worry about?
Thanks
Yes, you can limit the number of connections per host in the Cassandra cluster.
If you are using the C++ driver, check this out.
I visualize any query following the below path:
Client --> Session --> IO threads --> Connections --> Nodes
You can configure the number of IO threads(This is the number of threads that will handle query requests) associated with the session. In each IO thread, you can then configure the number of connections per host. If needed, the number of connections per host will increase based on certain parameters(The maximum count up to which this can be increased is also configurable).
So, at max, there can be x number of connections per host where,
x = number_of_sessions * number_of_IO_threads * max_number_of_connections_per_host
All 3 variables on RHS in the above equation are configurable.
Also check out:
https://www.datastax.com/dev/blog/4-simple-rules-when-using-the-datastax-drivers-for-cassandra
https://stackoverflow.com/a/28219086/5701173
We host a website on Microsoft Azure and we have Traffic Manager distributing traffic on two AppServices each with 15 instances and a maxpool size of 80 in the connection strings.
We also use P11 database which has a max connection count of 2400
From our understanding, the maximum possible connections would be:
Instance count * maxpool
30 * 80 = 2400
But we get errors regarding exceeding the maximum allowed number and to our surprise, running a query on the database to show us active connections yields 2600.
We don't have any webjobs running.
Can someone please explain what is happening?
Using the following query you can identity which program name have the most sessions, which login name creates the most sessions, which host creates the most sessions.
SELECT
c.session_id, c.net_transport, c.encrypt_option,
c.auth_scheme, s.host_name, s.program_name,
s.client_interface_name, s.login_name, s.nt_domain,
s.nt_user_name, s.original_login_name, c.connect_time,
s.login_time
FROM sys.dm_exec_connections AS c
JOIN sys.dm_exec_sessions AS s
ON c.session_id = s.session_id
The following statement shows you the maximum number of connections for the current tier.
SELECT ##MAX_CONNECTIONS AS 'Max Connections';
Hope this helps.
Regards,
Alberto Morillo