Перенести мессенджер в PostgreSQL и сессии в Redis.

Подтверждённые сообщения и действующие сессии переживают перезапуск, история читается по индексу, копия восстанавливается в новый том.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-23 12:24:59 +03:00
co-authored by Cursor
parent 65003b6119
commit c4c7a6aca2
29 changed files with 2933 additions and 35 deletions
+80
View File
@@ -0,0 +1,80 @@
{
"redis_and_postgres": [
{
"name": "redis down, no token",
"status": 401,
"code": "unauthorized",
"www_authenticate": "Bearer realm=\"messenger\""
},
{
"name": "redis down, bearer",
"status": 503,
"code": "unavailable",
"www_authenticate": null
},
{
"name": "redis down, live",
"status": 200,
"code": null,
"www_authenticate": null
},
{
"name": "redis down, ready",
"status": 503,
"code": "unavailable",
"www_authenticate": null
},
{
"name": "redis back, same token",
"status": 200,
"code": null,
"www_authenticate": null
},
{
"name": "history after redis stop",
"status": 200,
"same_message": true
},
{
"name": "postgres down, no token",
"status": 401,
"code": "unauthorized",
"www_authenticate": "Bearer realm=\"messenger\""
},
{
"name": "postgres down, bearer",
"status": 503,
"code": "unavailable",
"www_authenticate": null
},
{
"name": "postgres down, live",
"status": 200,
"code": null,
"www_authenticate": null
},
{
"name": "postgres down, ready",
"status": 503,
"code": "unavailable",
"www_authenticate": null
},
{
"name": "postgres back, same token",
"status": 200,
"code": null,
"www_authenticate": null
},
{
"name": "history after postgres stop",
"status": 200,
"same_message": true
}
],
"short_ttl": {
"ttl_window_seconds": 1.991,
"after_expiry": 401,
"www_authenticate": "Bearer realm=\"messenger\"",
"error_code": "unauthorized"
}
}