Skip to content
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

Open
wants to merge 98 commits into
base: refactor-usage-sn
Choose a base branch
from

Conversation

shimonewman
Copy link
Contributor

No description provided.

… 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::post('/v1/edge/sync')
Copy link
Member

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.

Copy link
Contributor Author

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 $@
Copy link
Member

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 $@
Copy link
Member

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

Copy link
Contributor Author

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
Copy link
Member

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')
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants