-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates in multi region sync #8232
base: refactor-usage-sn
Are you sure you want to change the base?
Conversation
…-sync � Conflicts: � composer.lock
…to feat-redis-sync � Conflicts: � app/init.php � app/preload.php � composer.json � composer.lock
…t-reatime-cache-cert-sync
… feat-reatime-cache-cert-sync � Conflicts: � .env � .gitignore � Dockerfile � app/cli.php � app/config/collections.php � app/config/regions.php � app/config/services.php � app/console � app/controllers/api/databases.php � app/controllers/api/functions.php � app/controllers/api/projects.php � app/controllers/api/storage.php � app/controllers/api/teams.php � app/controllers/api/users.php � app/controllers/general.php � app/controllers/shared/api.php � app/init.php � app/realtime.php � app/worker.php � app/workers/deletes.php � bin/worker-certificates � bin/worker-deletes � composer.json � composer.lock � docker-compose.yml � src/Appwrite/Platform/Services/Tasks.php � src/Appwrite/Platform/Tasks/Maintenance.php � src/Appwrite/Platform/Tasks/SSL.php � src/Appwrite/Platform/Workers/Certificates.php � src/Appwrite/Platform/Workers/sync-in.php � src/Appwrite/Platform/Workers/sync-out.php � src/Appwrite/Utopia/Response.php � tests/e2e/Services/Databases/DatabasesConsoleClientTest.php � tests/e2e/Services/Functions/FunctionsCustomServerTest.php � tests/e2e/Services/Realtime/RealtimeCustomClientTest.php
app/controllers/api/edge.php
Outdated
} | ||
}); | ||
|
||
App::post('/v1/edge/sync') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe edge is not the best term here. Lets try /v1/region
for region metadata (name, etc), and /v1/region/syncs
unless we find a better name for reporting all the keys to sync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed to region
@@ -0,0 +1,3 @@ | |||
#!/bin/sh | |||
|
|||
php /usr/src/code/app/worker.php sync-out-delivery $@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the name delivery, maybe we can just drop it.
bin/edge-sync
Outdated
@@ -0,0 +1,3 @@ | |||
#!/bin/sh | |||
|
|||
php /usr/src/code/app/cli.php edge-sync $@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this task for? let's avoid the term edge as it doesn't 100% fit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This task loops over payloads to delete the ones that were sent successfully and re-queue the failed ones.
Renamed to region
bla.tar.gz
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover
public function __construct() | ||
{ | ||
$this | ||
->desc('Schedules edge sync tasks') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we use a scheduler? I feel this will not be good enough for production. We need to strive to keep sync latency below 300ms at worst. This intervals might not cut it. I thought we will have a long running tasks that constantly fetches logs and send them async to all regions at the same time and has some retry logic.
… refactor-multi-region-sync � Conflicts: � composer.json � composer.lock � docker-compose.yml
No description provided.