sparkletown / sparkle

Building an open, community-owned hyperverse town
GNU Affero General Public License v3.0
33 stars 30 forks source link

What is a clean/efficient way to load test the platform? #1476

Open 0xdevalias opened 3 years ago

0xdevalias commented 3 years ago

Currently we don't really have any efficient patterns around load testing the platform, particularly to see how far it can scale, as well as making it easier to identify 'hard to find' performance issues that seem to only pop up at scale.

Would love to hear any thoughts/ideas around this, and any proposed solutions/things you have found useful in the past.

Given we are a rather 'frontend heavy' React app, and we're building around Firebase, I expect we don't really need to test the infrastructure layer of things at all, so will need to be able to simulate 'real user in a browser' sort of functionality.

I expect we may not need to do this via full 'browser integration test' automation, as that would presumably be fairly limiting if we wanted to see what 1000, 10,000, 100,000, etc users on the platform performs like from a 'data/updates' perspective. One idea I had for this in the past was to create little 'artificial load' scripts, that simulate the actions a user might be taking, but 'write' those directly into firebase, with only 1 'real browser' being used to 'feel the impact' of what that level of activity/updates would cause.

(Sparkle Team: We also have an internal issue about this: 🔒 https://github.com/sparkletown/internal-sparkle-issues/issues/267, as well as 🔒 https://github.com/sparkletown/internal-sparkle-issues/issues/871)

Background Context

I've tested the venue page with around 1000 audiences.

Was this with real/live users? Or did you create artificial users/‘fake load’ to test this out?

Originally posted by @0xdevalias in https://github.com/sparkletown/sparkle/issues/1434#issuecomment-846687470


I've used fake users to test this.

Originally posted by @soichih in https://github.com/sparkletown/sparkle/issues/1434#issuecomment-847032874


I've used fake users to test this.

Interesting.. how did you go about doing that out of curiosity? We haven't got any particularly good patterns/tooling around load testing features at the moment, so what you used here might be useful.

Originally posted by @0xdevalias in https://github.com/sparkletown/sparkle/issues/1434#issuecomment-849283010

0xdevalias commented 3 years ago

FYI, this is a load test script I created recently: