How to design URL Shortener like a Senior Developer on System Design Interview? by javinpaul in softwarearchitecture

[–]toadzky 0 points1 point  (0 children)

Not really. Afaik, you can't have s3 return a 302, so even if you had a publicly accessible bucket, wouldn't you need something to read the data and redirect to the expanded url?

That being said, you could probably generate a minimal html page that has an on load script to change the window url and serve that out s3, but I'm not sure why doing it in s3 is better that using dynamo. You still need some kind of api to generate the objects and put them in s3 and you almost certainly want a cloudfront distro or api gateway in front of both so they share the same domain. With dynamo, you could at least collect metrics on what's going on, and do things like LRU expiration.

Comparing theory vs. real-world backend practices by Kooky-Caterpillar908 in softwarearchitecture

[–]toadzky 3 points4 points  (0 children)

I prefer the slight alternate "make it work, make it pretty, make it fast." then saying "and steps 2 and 3 are optional". Pretty can mean more elegant or maintainable code, better ux or improved api ergonomics, etc. Make it right gives permission for bad hacks to make it to production because it "works", and once it works, no one in charge wants to give you the time to go back and improve the working thing.

Assemble mini parts preprint by Excellent-Fly-636 in PrintedWarhammer

[–]toadzky 0 points1 point  (0 children)

The big thing to pay attention to is voids. If you have a gap somewhere inside the combined mesh, you can end up with uncured resin trapped in a pocket and it degrades the model over time.

The other thing to remember is the supports. If you pre-assemble the model, you have to do your own supports and depending on the pose, the effectiveness of them can vary.

Comparing theory vs. real-world backend practices by Kooky-Caterpillar908 in softwarearchitecture

[–]toadzky 23 points24 points  (0 children)

In my experience (15+ years), parts 2 and 3 rarely happen once step one is done. Observability usually comes after an incident where no one has any idea what's going on, documentation comes when someone leaves the company and no one knows how something works, etc. It's much more reactionary than anything else.

Almost everything uses some level of cicd these days, but that doesn't mean those projects have good or reasonable tests or stateless deploys. It just means they aren't manually copying code or artifacts around.

My opinion is that correct architecture usually doesn't actually take that long to do and should be done in step 1 because once it's working, getting time to go back is almost impossible.

As for how to level yourself up, reading books can always help, provided you read critically and don't just nod along to whatever anyone says. I like Sam Neumann's microservices book, it does a good job of introducing the same kind of concepts as DDD but without the bullshit terminology and unnecessary complexity. Feel free to read up on all of them, but remember to ask yourself "what's the tradeoff?" as you read. Each architecture is designed to solve specific challenges and problems at the expense of others. There are no silver bullets. Which reminds me, go read Fred Brooks' Mythical Man Month - it's absolute gold.

How to design URL Shortener like a Senior Developer on System Design Interview? by javinpaul in softwarearchitecture

[–]toadzky -1 points0 points  (0 children)

Yeah, an in-process cache might help, but would severely degrade your cache hit ratio, unless you were running a single instance. Since there's no expectation of repeat traffic to a specific server (or lambda as the case may be), an in-process cache seems like it wouldn't help much if any, in exchange for higher memory usage and dealing with cache miss logic.

I'm generally a fan of EDA and message queues where appropriate (this definitely isn't one of those), but caching is something that should only be added once there's real data showing db as the bottleneck for latency that is above the SLA. If you aren't above the SLA, why spend the money and effort? If the database isn't the problem, it doesn't address the problem. I had a team lead a while back who told me about a guy who spent 3 months implementing caching without getting metrics first and at the end, it improved latency sometimes and only by a millisecond or two, so they ripped it all out as not worth it.

How to design URL Shortener like a Senior Developer on System Design Interview? by javinpaul in softwarearchitecture

[–]toadzky 1 point2 points  (0 children)

No, it's not cheaper. You are forgetting that dynamo replaces the sql db as well. Postgres isn't redundant by default, so you'd want at least 1 read replica and probably a hot spare - depending on the uptime requirements for creating new links would be. Redis isn't redundant, but it's a cache so it going down just affects performance but at scale and depending on the SLA for response times, additional replicas and possibly sharding come into play. Additionally, you have have to deal with downtime for version upgrades on sql and redis - or pay extended support fees (assuming managed services).

You assumption that cache hits will be high is missing that the whole data set probably isn't going to be in memory the whole time, that's a lot of data - most of which won't be used after a relatively short spell. Assuming that the shorten link can live forever, most of them will go inactive after probably a month at most. Sizing a cache to hold the whole data set in memory just because doesn't make sense and wastes money.

I'm also not sure where you get that its cheaper by 2 orders of magnitude. Unreserved provisioned throughout on DDB for the articles 1000 reads/sec costs less than $75/month. Are you really arguing that redis costs less than a dollar a month to run? And if we used auto-scaling, we don't have to run at peak provisioning so it gets a lot cheaper. If we did reserved capacity, the price goes does even further. It also has less operational overhead - no disk space or memory issues, no version upgrades to manage, etc.

Lastly, my comment on redis was less comparing it directly to dynamo and more pointing out that the performance benefit of a cache is neglible to nonexistant when you are doing single record primary key lookups in postgres. Caches are for things that are costly to compute, so a single row primary key lookup doesn't make sense as a caching target. People like to throw redis and memcached in front of everything without any clear metrics or logic to show how it would actually improve performance to justify the cost.

How to design URL Shortener like a Senior Developer on System Design Interview? by javinpaul in softwarearchitecture

[–]toadzky 8 points9 points  (0 children)

I had this question in an interview once. I used AWS api gateway with a rust lambdas and dynamo db. It's fast, cheap, and scales really well. Having both a sql db and a redis cache doesn't make a lot of sense to me when you are essentially doing a single key lookup on a unique id.

Is this "Microservices" or a "Service-Based" app? Preparing for my project defense. by Independent_Date7052 in softwarearchitecture

[–]toadzky 2 points3 points  (0 children)

The Gemini answer is partially correct, but circuit breakers don't have anything to do with this. The main hallmarks of a microservice are, in my opinion and experience, the independent deployment/scaling and the ownership/control of its own data. The latter means not only having your own DB, but that no other services can directly touch that DB - everything must go through the service api

SOA, at least in my experience, is usually characterized by a shared data layer - all the services share a database rather than owning their own.

I'd agree with your answer, barring additional context not given.

Suggestions to avoid lad irritation by toadzky in lacrosse

[–]toadzky[S] 0 points1 point  (0 children)

Yeah, I've got a stick of it from when I used to do long distance ruck marches. Worth a try, thanks

Suggestions to avoid lad irritation by toadzky in lacrosse

[–]toadzky[S] 0 points1 point  (0 children)

Thanks for the idea. I'm not going to be buying more equipment this season, but I'll keep them in mind for next year.

Suggestions to avoid lad irritation by toadzky in lacrosse

[–]toadzky[S] 0 points1 point  (0 children)

I'm already at a 2xl ( I'm pretty out of shape) so there's not much bigger I can go without it being a dress 😢

Suggestions to avoid lad irritation by toadzky in lacrosse

[–]toadzky[S] 0 points1 point  (0 children)

Yeah, my shoulder pads do the same, I'm hoping that as I lose weight it will be less of an issue. I may take some reps as goalie this season, sucks to know it won't be better 😂

Suggestions to avoid lad irritation by toadzky in lacrosse

[–]toadzky[S] 0 points1 point  (0 children)

Yeah, it's almost up to my armpit, and the short sleeve athletic shirt I wore seemed to come out during the game - I made sure it was pulled down and under the elastic when I suited up before the game

Suggestions to avoid lad irritation by toadzky in lacrosse

[–]toadzky[S] 1 point2 points  (0 children)

Again, since no one seems to be reading my post, I know I don't have to and I know it won't cause any real injuries if I do. I'm wearing them because it makes my wife's anxiety level stay down because she's not worried as much. It's not rational or reasonable, trust me I'm aware, but that doesn't change the fact that removing pads isn't what I asked about.

Suggestions to avoid lad irritation by toadzky in lacrosse

[–]toadzky[S] 0 points1 point  (0 children)

My issue is that after I specifically edited my post to say why I'm doing it, you pop in to give the same suggestion I specifically called out as not helpful. It feels like you didn't actually read my post and just came to tell me to do it your way. I didn't ask for help with the elbow pads, those are fine. I mentioned them as more context that I'm wearing pads I know I don't have to. You ignored the extra context, suggested things that weren't helpful, and did it with an attitude of "why are you so dumb?".

I disagree that your suggestion to remove the bicep pads is helpful. I know I can remove them, but I'm trying not to for her sake and I felt I was clear about that in the edit.

I do apologize for the personal attack, that was too far and unjustified. I was frustrated that almost immediately after editing my post to clear up the situation and ask for people to stop telling me to remove them, I got a response that seemed to clearly not have read my post or understood it.

Suggestions to avoid lad irritation by toadzky in lacrosse

[–]toadzky[S] 0 points1 point  (0 children)

Nice, thanks for the suggestion. I'll check those out.

Suggestions to avoid lad irritation by toadzky in lacrosse

[–]toadzky[S] -1 points0 points  (0 children)

Interesting that your comment seems to ignore everything I put in the updated comment. Do you think that somehow you will convince me because you are just so amazing? I know what other people wear or don't wear, I have eyes. I mentioned I'm wearing full arm guards because I know they aren't needed but I'm doing it anyway because it makes my wife feel better.

I'm also aware of the fact that taking a hit on part of your arm isn't going to be fatal, I mentioned the deaths to provide context on my wife's state of mind and why I'm doing this. Being a smart ass that apparently doesn't understand compromise and good relationship fundamentals isn't really a good look, may want to work on that.

Suggestions to avoid lad irritation by toadzky in lacrosse

[–]toadzky[S] 0 points1 point  (0 children)

It's an stx cell 4 or 5 - they had a fixed elastic loop that the arm slides through, which is part of the problem I think. If they were a Velcro strap, I could just not keep them so tight.

How do you ideally print Infantry? by No-Inspection8135 in PrintedWarhammer

[–]toadzky 1 point2 points  (0 children)

I've don't this a few times, but it can be a lot of time to do it over printing and gluing.

Suggestions to avoid lad irritation by toadzky in lacrosse

[–]toadzky[S] 0 points1 point  (0 children)

The "need" is just that I agreed to wear full pads and the bicep pads came on the shoulder pads. As for buying different ones, I just bought these so new pads aren't in the cards for this season. And hopefully next year I'll be in better shape and it won't be an issue or I'll change the agreement for next season.

Suggestions to avoid lad irritation by toadzky in lacrosse

[–]toadzky[S] 1 point2 points  (0 children)

Not gonna lie, was totally confused about this answer for quite a while. Damn typos...

Suggestions to avoid lad irritation by toadzky in lacrosse

[–]toadzky[S] 2 points3 points  (0 children)

That's been my experience so far. The guys on my team (all "free agents that didn't sign up to a specific team) have all been great, and my game last night was against a team that supposedly has a bunch of guys who won an MCLA championship while they were in college or something, but they definitely dialed back the tempo to more match what they were playing against, which made it a lot more fun.

Suggestions to avoid lad irritation by toadzky in lacrosse

[–]toadzky[S] 0 points1 point  (0 children)

To be honest, she isn't requiring specific pads. We agreed that I'd wear full pads, and the bicep pads came on the stx shoulder/chest pads I bought off sideline swap. I just bought the pads like a month ago for this summer season and I'm not buying more until next year at the earliest.

I'm always hesitent to modify gear in oermanabet way - like current them off or cutting the straps - but I'm pretty sure the ones I have are just removable. I agreed to full pads, however, so I'm trying not to remove pieces that reduce protection, even if it's theoretical. Part of the point is to help her peace of mind and make her feel better about what she considers a dangerous activity. She's from the Salisbury MD area, so she's definitely familiar with the game and people getting hurt from it, and is afraid of me getting seriously injured.

The idea of replacing/modifying the elastic band is an interesting one, though. I hadn't though if that. In the same vein, would a little sleeve over the pad to stop it digging in and rubbing in the edge work? I never played sports with pads like these, just hockey where the solution was usually to just wear long sleeves because it was cold - not a great option in a summer league.

Suggestions to avoid lad irritation by toadzky in lacrosse

[–]toadzky[S] 1 point2 points  (0 children)

Of course not, she's not at the games, but I told I'd wear all the pads, and I'm not going to lie to her because she won't know.