Files
shared-SQS/BENCHMARK-COMPARISON.md
T

62 lines
3.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Benchmark Comparison: shared-SQS vs Yandex Message Queue
Результаты сравнительных тестов shared-SQS и Yandex MQ.
Дата: 2026-04-12.
## Ключевые результаты
- shared-SQS **в 2–2.5x быстрее** Yandex MQ при последовательных запросах.
- При высокой параллельности (50 workers) — **паритет**.
- Cold start shared-SQS — **53ms** vs **131ms** у Yandex MQ.
- Покрытие: все 17 SQS-операций.
## Throughput (SendMessage, Python HTTP)
Прямое сравнение пропускной способности — тот же скрипт, те же условия запуска.
| Режим | shared-SQS | Yandex MQ | Разница |
|---|---:|---:|---|
| Cold start | 53 ms | 131 ms | shared-SQS **2.5x быстрее** |
| Sequential, 100 msg | **25 msg/s** (40 ms avg) | 11 msg/s (94 ms avg) | shared-SQS **2.3x быстрее** |
| 5 workers × 20 msg | **109 msg/s** (9 ms avg) | 46 msg/s (22 ms avg) | shared-SQS **2.4x быстрее** |
| 10 workers × 20 msg | **166 msg/s** (6 ms avg) | 87 msg/s (11 ms avg) | shared-SQS **1.9x быстрее** |
| 20 workers × 20 msg | **226 msg/s** (4 ms avg) | 139 msg/s (7 ms avg) | shared-SQS **1.6x быстрее** |
| 50 workers × 20 msg | **264 msg/s** (4 ms avg) | 267 msg/s (4 ms avg) | паритет |
> Тесты запускались с VM в том же датацентре. Без AWS CLI — чистый HTTP (Python urllib + SigV4).
## Latency по операциям (AWS CLI)
Замеры через `aws-cli` (включают ~700ms overhead на запуск CLI).
Показывают **относительную** разницу между провайдерами.
Формат: min / avg / max / p95, миллисекунды.
| Операция | Yandex MQ | shared-SQS |
|---|---:|---:|
| GetQueueUrl | 766 / 1346 / 2266 / 2060 | 739 / 752 / 770 / 760 |
| GetQueueAttributes | 804 / 820 / 847 / 828 | 738 / 752 / 768 / 765 |
| SendMessage 1KB | 804 / 811 / 824 / 823 | 748 / 760 / 770 / 767 |
| SendMessage 10KB | 916 / 967 / 996 / 987 | 880 / 913 / 965 / 951 |
| SendMessage 32KB | 905 / 930 / 948 / 947 | 883 / 904 / 939 / 928 |
| SendMessageBatch 10 | 784 / 803 / 827 / 820 | 718 / 746 / 782 / 759 |
| ReceiveMessage | 782 / 826 / 869 / 864 | 738 / 748 / 777 / 751 |
| DeleteMessage | 783 / 800 / 823 / 814 | 727 / 742 / 757 / 755 |
| DeleteMessageBatch 10 | 818 / 845 / 872 / 864 | 742 / 783 / 821 / 810 |
| ChangeMessageVisibilityBatch 10 | 806 / 829 / 848 / 841 | 803 / 824 / 838 / 836 |
> Абсолютные цифры включают overhead AWS CLI (~700ms). Реальная latency сервиса — 4–40ms (см. таблицу throughput выше).
## Покрытие операций
В тестах проверены все 17 SQS-операций:
- **Latency-сравнение (10):** GetQueueUrl, GetQueueAttributes, SendMessage, SendMessageBatch, ReceiveMessage, DeleteMessage, DeleteMessageBatch, ChangeMessageVisibility, ChangeMessageVisibilityBatch, SetQueueAttributes
- **Функционально (4):** CreateQueue, DeleteQueue, ListQueues, PurgeQueue
- **Tag-операции (3):** TagQueue, UntagQueue, ListQueueTags
## Вывод
shared-SQS — полнофункциональная AWS SQS-совместимая реализация.
В прямом сравнении с Yandex MQ: быстрее при малой и средней параллельности, паритет при высокой нагрузке.