-
Notifications
You must be signed in to change notification settings - Fork 1
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
perf(VehiclesForRouteChannel): Use vehicles from PubSub instead of GenServer #225
Conversation
cb47e06
to
f5869ff
Compare
f5869ff
to
cf56091
Compare
cf56091
to
4672541
Compare
@@ -31,14 +31,7 @@ defmodule MobileAppBackendWeb.PredictionsForStopsV2Channel do | |||
@spec handle_info({:new_predictions, any()}, Phoenix.Socket.t()) :: | |||
{:noreply, Phoenix.Socket.t()} | |||
def handle_info({:new_predictions, new_predictions_for_stop}, socket) do | |||
{time_micros, _result} = |
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.
tiny log cleanup while copying over behavior of predictions channel
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.
Did you bother running load testing again with these changes just to get a sense of the new upper threshold for connections? It's fine if not, I'm mostly just curious.
@EmmaSimon thanks for asking - definitely worth running again, and I hadn't yet! Added results to the Load testing doc - this got us to push past 3,300 users at a rate of 5 users / second. I think we'll still want to tackle static data caching to improve that further, or start with a higher base # of instances running. |
Summary
Ticket: [Name](https://app.asana.com/0/1205732265579288/1208619681848095/f)
What is this PR for?
Addresses the bottleneck found in Load Testing when many users are joining vehicles channels at once.
Vehicles.PubSub
is largely a copy ofPredictions.PubSub
- there is probably a good basis for extracting out common pieces, but I think it is worth saving that for a separate ticket.This does switch
VehicleChannel
to use PubSub as well for consistency.Testing: