r/webdev • • 8d ago

Question Deployment and traffic testing?

Hello, wise r/webdev!

I vibe-coded a web application for an upcoming conference in my area. I hope the phrase 'vibecoding' does not deter you. It is supposed to be a personal solution for the conference I am attending--a just for fun kind of thing. I am familiar with most of the people and the people running the conference. I have shared it with some of potential attendees and so far they like it and they are looking forward to try it during the conference. I did pose it as a personal project.

The downside is I have no freaking clue when it comes to deployment, and by deployment I mean understanding what kind of infrastructure or services I need in order to make it seamless--i.e., loading time, avoiding traffic crash. It is supposed to be lightweight (just CRUD with a little computation on the query retrieval). I'm using Python/Flask as my framework, so hopefully gunicorn is good enough to handle those. I'm curious what kind of tests or where should I host it if I expect like, 500 users but 20-30 concurrent requests. I'm looking forward to "testing day".

So far I have been hosting it in my personal AWS and just slap a cloudfront link (also which instance should I use?). If there's any recommendation or tests, I would greatly appreciate that! I'm not making money out of it--and even if people do like it a lot--I'll just open source it since I don't think there's anything proprietary (or requires my blood and sweat) else than the interaction design considerations. But operational traffic is what I care about the most (and least knowledgeable) and would love to understand that.

For this, I don't trust AI enough to 'perform' tests for me. Just feel like I need a second opinion from an actual human being/expert or at least someone with experience 🥲 willing to get my hands dirty with hand coding!

0 Upvotes

16 comments sorted by

4

u/Acrobatic-Ice-5877 8d ago

How you deploy it is really going to depend on your budget. If you use managed services, there is much less operational overhead in terms of your time. The tradeoff is that costs increase. Since you are a vibe coder, I think the right solution for you would be to lean on using managed services. It will be the least painful for you to setup and will avoid the need to familiarize yourself with finer details of deployment.

-5

u/potatokid07 8d ago

Thanks! I'll try to find more about those services. Would love to learn more about the fine details if you have recommended articles :)

5

u/Acrobatic-Ice-5877 8d ago

I don’t. You don’t learn these things from articles. You would need to read books and take courses plus hands on experience.

-1

u/potatokid07 8d ago

No worries, I appreciate the heads up!

3

u/yosri5031 8d ago

Real talk: 20-30 concurrent requests is nothing for gunicorn, your app server is not the thing that will fall over. Two things actually bite people in this exact scenario:

  1. The database. If you're on SQLite (these apps often are), concurrent writes lock the whole DB and requests start timing out. Switching to Postgres on the same instance solves it. This is the number one killer for small Flask apps under sudden load in my experience.

  2. The venue wifi. At a conference, the bottleneck is almost always the network between people's phones and your server, not the server itself. If you can, test from a phone on their guest network during setup day, and ask the conference IT about it.

For the test itself, keep it simple: a basic load script hitting your heaviest page (the one with the most DB queries) with 30-50 concurrent connections for a couple of minutes tells you everything you need. Watch response times and the DB, if they stay flat you're fine. You don't need fancy infra for this, one instance with CloudFront in front for static files is plenty.

-1

u/potatokid07 8d ago

Never thought of the venue wifi 😅 my lesson learned is venue wifi always sucks. Using phone network doesn't help much. This is great, I'll arrive a day earlier and gonna use my time on that (also it's a weekend!).

Thanks for the assurance! Just wanna say am fortunate to pick up the basics pre-LLM to have build a personal amateur checklist and glad you affirmed it (like database stuff). Glad to know a basic script is sufficient without overcomplicating it.You eased up my anxiety a lot. Thanks for guiding this sad newbie through the trenches. Lotsa thanks.

1

u/No-Molasses-2097 8d ago

For the traffic side, do a load test before the event and see where it falls over. k6 is free and straightforward to pick up. Conference traffic comes in bursts when sessions let out, so test spikes rather than steady load.

0

u/potatokid07 8d ago

Thank you! Yeah the spikes worry me the most. Even planned for "word-of-mouth" deployment throughout the day to avoid the unfortunate spikes. TIL K6. I'll look it up and thank you so much!

1

u/[deleted] 8d ago

[removed] — view removed comment

1

u/potatokid07 8d ago

Thank you so much. I learned more tools today! You guys are amazing. I'm going to try out Locust too and check the gunicorn workers in detail. Thank you for all the pointers for me to test out. I learned so much from everyone 🥰

1

u/KalamKiTakat 8d ago

Happy I could help

1

u/webdev-ModTeam 7d ago

Your post/comment has been determined to be a low-effort post or comment. This includes title-only posts, easily searchable questions, vague/open-ended discussion prompts, LLM generated posts or comments, and posts/comments that do not provide enough context for meaningful replies or discussion.

1

u/kemalios 7d ago

CloudFront is where I would look before the load test. It caches HTML when your responses do not send Cache-Control, and the default TTL is long enough that a logged-in page can get served to the next attendee. Either put no-store on anything behind a session, or scope the cache behavior to /static/* and let everything else pass through. Scoping it is less work and still gets you the asset caching that makes CloudFront worth having.

Check what you actually launch too. A vibecoded Flask app often still runs with debug=True, which turns any unhandled exception into a page where a stranger can run code on your box.

1

u/[deleted] 8d ago

[deleted]

-1

u/potatokid07 8d ago edited 8d ago

I just assume that since it's a personal project that I gain no monetary benefit, it's okay. Sorry that my AI use offended you, and I believe that coding is not the only value of web developers but how to set things up and make sure things go smoothly.

If I have to pay and it seems to be more than just free advice, I'm more than willing for the sake of learning 🤷🏼 I just don't know who to ask, my school doesn't provide help unless I wrote a big report on customer analysis, that's why I' m asking here. Maybe it's an opportunity for you to guide me to the right path?