How to limit the number of TCP connections while interacting with map.

692
3
05-30-2022 11:05 AM
Sukhesh_Krishna
New Contributor II

We have a WPF windows application developed using ArcGIS Runtime and it's observed that while interacting with map multiple TCP connections are made with server and each time it opens a new TCP port(especially when tiled services are involved). Is there any way we can limit the number of TCP ports created by application ? 

Details:

ArcGIS Runtime 100.10

.NET Framework 4.6.1-WPF

Windows 10 OS

0 Kudos
3 Replies
dotMorten_esri
Esri Notable Contributor

You can try setting the max connections: HttpClientHandler.MaxConnectionsPerServer; However we do have a minimum of 6, otherwise you might see a big performance penalty in especially tile loading performance.

I'm curious why this is a concern? How many ports are you seeing getting opened? Also how many different layers and domains are you accessing tiled services on?

0 Kudos
Sukhesh_Krishna
New Contributor II

Hi,

We have 3 layers, from single domain and while zoom in/out 10-15 connections are getting created. 

So trying to limit the number of connections at low bandwidth.

Thanks,

Sukhesh Krishna.

0 Kudos
dotMorten_esri
Esri Notable Contributor

Have you considered to move from .NET Framework to .NET 6? It uses Http2/0 for tile requests, so that might give you more benefit for low-bandwidth scenarios. The number of connections you're seeing is pretty common for multiple layers, unless you limit it more (which would also affect performance).

0 Kudos