How to migrate/ set region for worker.

I have observed the following regarding the latency and query response times: * Database Location: AWS ap-south-1 (Mumbai) * Server Location: California (San Francisco) * User Access Sites: Hyderabad, US Latencies: 1. California to Mumbai: 150 ms to 250 ms 2. Hyderabad to California: 200 ms to 300 ms 3. Mumbai to California: 150 ms to 250 ms 4. California to Hyderabad: 200 ms to 300 ms Round-Trip Time (RTT): * RTT: 400 ms to 600 ms Query Time: * Single Query Time: 700 ms to 1,100 ms For instance, when retrieving a project and processing all related data—such as actions, sections, deliverables, document editor, and content_block, associations and action cashing logic. Imaging Below use case. 1. 10 RTTs with the Database: Maximum of 5.6 seconds 2. Time for Processing (Payload creation, caching logic, etc.): Additional time Total Time for 10 Queries: * RTT: 5.6 seconds * RTT for Client-Server Communication: 1.1 seconds * Processing Time: 1 second Total Estimated Time: 7.7 seconds Currently, the client is receiving responses within 7 to 8 seconds, which aligns with the calculated time. How i can migrate my server to India Mumbai region, I need to restrict it to serve from Mumbai based data center only no matter from where request is coming.
5 Replies
D Trombett
D Trombett4mo ago
If it's a worker, there is a "smart" placement option which will execute it in the servers near your databases etc
MD AMIR SOHAIL
MD AMIR SOHAILOP4mo ago
server located in california and database is in mumbai i need to move cloudflare worker to run in mumbai server. this does nothing for me, i enabled it but no difference. need to ask cloudflare team ? just need to wait... I am waiting for it from last 3 days but there is no difference.
MD AMIR SOHAIL
MD AMIR SOHAILOP4mo ago
No description
No description
D Trombett
D Trombett4mo ago
If you've just enabled it it may take a couple days to start working correctly, not sure if there is a way to "force" the region
MD AMIR SOHAIL
MD AMIR SOHAILOP3mo ago
{
"result": {
"id": "platform-staging",
"default_environment": {
"environment": "production",
"created_on": "2023-08-25T10:57:46.557801Z",
"modified_on": "2024-08-19T05:58:18.657654Z",
"script": {
"created_on": "2023-08-23T10:20:09.662547Z",
"modified_on": "2024-08-19T05:58:18.657654Z",
"id": "platform-staging",
"tag": "27fec8a39581e2b8e121aee5021",
"tags": [],
"deployment_id": "",
"tail_consumers": null,
"logpush": false,
"placement_status": "INSUFFICIENT_INVOCATIONS",
"etag": "43ff70fb53471b8b3514d2a66b6e1c021605e809c406b7daee8230",
"handlers": [
"fetch",
"queue",
"scheduled"
],
"placement_mode": "smart",
"last_deployed_from": "dash",
"compatibility_date": "2023-08-07",
"usage_model": "standard"
}
},
"created_on": "2023-08-25T10:57:46.557801Z",
"modified_on": "2024-08-19T05:58:18.657654Z",
"usage_model": "",
"environments": [
{
"environment": "production",
"created_on": "2023-08-25T10:57:46.557801Z",
"modified_on": "2024-08-19T05:58:18.657654Z"
}
]
},
"success": true,
"errors": [],
"messages": []
}
{
"result": {
"id": "platform-staging",
"default_environment": {
"environment": "production",
"created_on": "2023-08-25T10:57:46.557801Z",
"modified_on": "2024-08-19T05:58:18.657654Z",
"script": {
"created_on": "2023-08-23T10:20:09.662547Z",
"modified_on": "2024-08-19T05:58:18.657654Z",
"id": "platform-staging",
"tag": "27fec8a39581e2b8e121aee5021",
"tags": [],
"deployment_id": "",
"tail_consumers": null,
"logpush": false,
"placement_status": "INSUFFICIENT_INVOCATIONS",
"etag": "43ff70fb53471b8b3514d2a66b6e1c021605e809c406b7daee8230",
"handlers": [
"fetch",
"queue",
"scheduled"
],
"placement_mode": "smart",
"last_deployed_from": "dash",
"compatibility_date": "2023-08-07",
"usage_model": "standard"
}
},
"created_on": "2023-08-25T10:57:46.557801Z",
"modified_on": "2024-08-19T05:58:18.657654Z",
"usage_model": "",
"environments": [
{
"environment": "production",
"created_on": "2023-08-25T10:57:46.557801Z",
"modified_on": "2024-08-19T05:58:18.657654Z"
}
]
},
"success": true,
"errors": [],
"messages": []
}
got this status it says "placement_status": "INSUFFICIENT_INVOCATIONS", how many INVOCATIONS it requires After switching to smart placement, my server's response time has tripled, increasing from 6-7 seconds to 21-22 seconds. What is optimal location it's wrost location placement. @Erisa @John Spurlock @Purple Blob Anyone of you can help me to resolve my issue.
Want results from more Discord servers?
Add your server