I'm on my phone right now but I believe the hold up is somewhere between our self host livekit server and our backend. I press a button on frontend, send a POST to our backend. Create a RoomServiceClient and call deleteRoom. Then I receive the webhook room_finished and send that to our frontend via websockets. However it feels like the step between deleteRoom and webhook takes time. But in your experience it should be instant?
I added some timestamps for each function and as I suspected, closeRoom (our endpoint) and room_finished (webhook) takes 20 seconds.
closeRoom: 2023-12-26 161816.847
room_finished: 2023-12-26 161836.528
sendRoomFinished: 2023-12-26 161836.542
Edit: My bad, we had a bottleneck in one of our functions. Your functions are lightning fast ;)