-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
12ea894b7022e1a7136b968a01994289b5c5d725
- Loading branch information
Showing
30 changed files
with
239 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## v0.5.22 - 2024-03-26 | ||
### Added | ||
* `shared-client` for gRPC and HTTP generators | ||
### Changed | ||
* Refactoring HTTP generators. Now they use common components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
changesDir: .changes | ||
unreleasedDir: unreleased | ||
headerPath: header.tpl.md | ||
changelogPath: CHANGELOG.md | ||
versionExt: md | ||
versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}' | ||
kindFormat: '### {{.Kind}}' | ||
changeFormat: '* {{.Body}}' | ||
kinds: | ||
- label: Added | ||
auto: minor | ||
- label: Changed | ||
auto: major | ||
- label: Deprecated | ||
auto: minor | ||
- label: Removed | ||
auto: major | ||
- label: Fixed | ||
auto: patch | ||
- label: Security | ||
auto: patch | ||
newlines: | ||
afterChangelogHeader: 1 | ||
beforeChangelogVersion: 1 | ||
endOfVersion: 1 | ||
envPrefix: CHANGIE_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Практики использования | ||
|
||
- [RPS per instance](./best_practices/rps-per-instance.md) | ||
- [Shared client](best_practices/shared-client.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[Home](../../index.md) | ||
|
||
--- | ||
|
||
# Use shared client | ||
|
||
## General principle | ||
|
||
### Transport client | ||
|
||
By default, Pandora components automatically assign it a transport client, such as for http, grpc, or tcp, when creating | ||
a new Instance. When the Instance starts, it opens a connection, such as a tcp connection. | ||
Normally, clients can use multiple connections at the same time, but in the case of Pandora, | ||
each Instance opens only one connection as the Instance makes requests one after the other. | ||
|
||
It's interesting to note that creating a connection doesn't mean that requests will go through that connection. Why? | ||
In the test configuration, you can specify a large number of instances and a small number of RPSs. | ||
The Pandora provider generates requests with the frequency specified in the RPS settings | ||
and sends them to a random instance so that the instance will execute the request. | ||
|
||
## `shared-client`. | ||
In the [http](../http-generator.md) and [grpc](../grpc-generator.md) generator settings, | ||
you can specify the `shared-client.enabled=true` parameter. If you enable this setting, | ||
all instances will use a shared transport client and each will not have to create its own. | ||
|
||
## `shared-client.client-number`. | ||
|
||
The transport client uses to connect the connection. For example, HTTP and gRPC use a tcp connection. | ||
A single client uses multiple connections and can create additional connections if needed. | ||
|
||
But under heavy loads there may be a situation when the client does not have time to create connections. | ||
You can increase the speed of connection creation by a common client by increasing the `shared-client.client-number` parameter. | ||
By default `shared-client.client-number=1`. | ||
|
||
--- | ||
|
||
[Home](../../index.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Практики использования | ||
|
||
- [RPS на инстанс](best_practices/rps-per-instance.md) | ||
- [Общий транспорт](best_practices/shared-client.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[Домой](../index.md) | ||
|
||
--- | ||
# Использовать общий транспорт | ||
|
||
## Общий принцип | ||
|
||
### Транспортный клиент | ||
|
||
По умолчанию, компоненты Pandora при создании нового Инстанса автоматически назначают ему транспортного клиента, | ||
например, для http, grpc или tcp. Когда Инстанс запускается, он открывает соединение, например, tcp соединение. | ||
Обычно, клиенты могут использовать несколько соединений одновременно, но в случае с Pandora, | ||
каждый Инстанс открывает только одно соединение, так как Инстанс выполняет запросы один за другим. | ||
|
||
Стоит заметить, что создание соединения не означает, что запросы будут идти через это соединение. Почему? | ||
В настройках теста можно указать большое кол-во инстансов и маленькое кол-во RPS. | ||
Провайдер Пандора генерирует запросы с частотой указаной в настройках RPS и передает на случайный инстанс, чтобы | ||
инстанс выполнил этот запрос. | ||
|
||
## `shared-client` | ||
|
||
В настройках генераторов [http](../http-generator.md) и [grpc](../grpc-generator.md) можно указать параметр `shared-client.enabled=true`. | ||
Если включить данную настройку, то все инстансы будут использовать общий транспортный клиент и каждый не будет | ||
создавать собственный. | ||
|
||
## `shared-client.client-number` | ||
|
||
Транспортный клиент использует для подключения соединения. Например, HTTP и gRPC используют tcp соединение. | ||
Один клиент использует нескоклько соединений. И может создавать дополнительные при непобходимости. | ||
|
||
Но при больших нагрузках может возникнуть ситуация, когда клиент не успевает создать соединения. | ||
Можно увеличить, скорость создания соединений общим клиентом, увеличив параметро `shared-client.client-number`. | ||
По умолчанию `shared-client.client-number=1` | ||
|
||
--- | ||
|
||
[Домой](../index.md) |
Oops, something went wrong.