1[← Logger](7-Logger-EN.md) | Concurrent[(中文)](8-Concurrent-CN.md) | [Asynchronous Call →](9-Asynchronous-EN.md)
2***
3
4## Concurrent Request
5
6* Due to the concurrency nature of the Go language, we recommend that you control the concurrent requests for the SDK at the application level.
7* In order to facilitate your use, we also provide a direct use of concurrent invocation mode, the relevant concurrency control by the SDK internal implementation.
8
9### Open SDK Client's concurrent function.
10
11```go
12// Maximum Running Vusers
13poolSize := 2
14// The maximum number of requests that can be cached
15maxTaskQueueSize := 5
16
17// Enable asynchronous functionality at creation time
18config := sdk.NewConfig()
19            .WithEnableAsync(true)
20            .WithGoRoutinePoolSize(poolSize)            // Optional,default:5
21            .WithMaxTaskQueueSize(maxTaskQueueSize)     // Optional,default:1000
22ecsClient, err := ecs.NewClientWithOptions(config)
23
24// It can also be opened after client is initialized
25client.EnableAsync(poolSize, maxTaskQueueSize)
26```
27
28***
29[← Logger](7-Logger-EN.md) | Concurrent[(中文)](8-Concurrent-CN.md) | [Asynchronous Call →](9-Asynchronous-EN.md)