10 ms·
Ask HN: What is best way to do hands-on practice for system design?
I have build many small size web apps.
I lack experience in designing medium to large application. I tried to read system design content but not able to gain confidence.
How can I do the hands-on practice of system design concepts. Please your tips, resources, plan etc.
- __d 4y agoI think practicing design is difficult because of one major issue: how will you know if you got it right? I think the only way is to actually implement the design, and learn what works and what doesn't (and, crucially, why). It's essentially an apprenticeship: you work in teams and as you gain experience, you contribute progressively more and bigger ideas. One day, you get a job where the design is your responsibility.
- joshxyz 4y agogoogle for "github system design primer" repository, youll get ideas
- asicsp 4y agoThis one? https://github.com/donnemartin/system-design-primer https://github.com/donnemartin/system-design-primer There's also a list here with more resource links: https://github.com/madd86/awesome-system-design https://github.com/madd86/awesome-system-design
- oxff 4y agoBuild a system. That's how you learn.
- naikrovek 4y agoYeah. Video games are very good at getting you to do this, and for teaching systems thinking. Not directly related to any specific type of system, of course, but very good at getting you to build a system, maintain it, and fix any issues with it. Factorio is an obvious example.
- hluska 4y agoFirst, it is very hard and there is no such thing as a set of perfect answers for every situation. So, relax and try to have fun while you learn - you might be right, you might be wrong and so is every other developer. L Second, I think the best way to learn is to just work on a lot of systems. Sometimes your ideas will work out. Other times, you will wish you had become anything other than a software developer. Both states are equally helpful. It’s nice to write good software and have things work out. But you’ll learn a lot more from the projects you can only fix with ‘rm -rf’. Third, try to get as wide a range of experience as possible. Be the lead designer on one project. And be extremely junior on another project. You’ll learn as much from implementing another person’s designs as you will learn from implementing you own. And finally, have fun and be cool to everyone you work with. You will meet a lot of beautiful people and a lot of assholes. But if you love writing software, you’re part of the tribe. Make it positive and be cool to others. In twenty years, you won’t remember half of what you know now. But you will always remember developers who were kind to you when you were learning. Be one of those memorable developers…:) Good luck. It’s a hard path but I know you can do it. You’ve proven it by starting off here.
- gillh 4y agoPlay Factorio.
- jm1271 4y agoI've had some limited experience with architecture katas[0] and they seem to do a decent job of exercising this skill. They're no replacement for experience, but at least they're _something_. [0] https://nealford.com/katas/#:~:text=Architectural%20Katas%20are%20intended%20as,the%20facilitator%20for%20the%20exercise https://nealford.com/katas/#:~:text=Architectural%20Katas%20....
- vishnugupta 4y agoYou get hands on experience at a place 1. That has a functioning app AND 2. Business is growing rapidly bringing more customers than the system can handle. In other words you learn on the job by getting your hands burnt. I got lucky to have joined such a startup. Learnt a lot, from fixing DB queries, designing asynchronous order processor, using CDN etc. I worked on scaling up the full stack including stuff like connection pools. So your best bet is to join such a startup. You will learn a lot by handling real user traffic. And also scaling isn’t homogeneous. For example, you make different trade offs scaling a search application Vs scaling a payment processor. So business use case and business domain does matter.
- tleilaxu 4y agoTo add something further to this excellent comment: Join a start up with a legacy code base, e.g. dodgy old PHP that they’re pulling out into modern domain services. Within a year you’ll be able to analyse performance and scalability issues and refactor them in your sleep.
- beebmam 4y agoIf you want to build your skills, sure go ahead. But working at a company like this is not a good way to build your wealth. You're far better off working at a big tech company that has awesome benefits or a fresh startup. Startups that have been around long enough to have a legacy code base aren't a place to become wealthy.
- xiwenc 4y agoNot everyone aims to be wealthy. Most companies do pay a decent salary (specially in europe) with good work life balance. High paying jobs often correlates with high stakes which means potentially higher level of stress.
- throwaway7173 4y agoI think the comment meant "wealth" in the pg sense https://www.paulgraham.com/wealth.html https://www.paulgraham.com/wealth.html
- mesarvagya 4y agoHere are some tips which most of distributed systems follow : 1. Almost all distributed systems has a global load balancer sitting in front, which will distribute your traffic to nearest possible server. 2. Decide how do you want to make your DB replication to happen. Is it active/active, active/passive, P2P, etc ? 3. What do you choose between Consistency and Availability when Network Partition happen? Some databases like Cassandra are eventual consistent. 4. Any asynchronous tasks will need to use queuing service. 5. Any performant API will need to use Caching and CDN.
- q7xvh97o2pDhNrh 4y agoHmm. I think you might be getting at two different questions. One: How do you get better at systems design? Build stuff -- lots of stuff. If you're interested in designing particular kinds of systems (say, planet-scale web services...), then get a job at a company that does that kind of thing. Two: How do you get better at systems design interviews? That's much easier; you can just throw money at the problem. Use one of those paid mock-interviewing platforms where you can hire FAANG interviewers to anonymously interview you and give you feedback. I just went through this interview prep and got the offers I wanted, so I can offer you a data point. It took me < 20 mock interviews (total cost of < $10K) to go from "I have no idea what I'm doing" to "I'm not worried about this part of the on-site interview loop." Admittedly, I have a decent bit of experience architecting systems at scale, so I was mostly using this approach to refresh my memory (heading back to a Big Tech job after several years of retirement) and get familiar with the interview format. There are some common resources recommended for this sort of thing if you want to also make sure you've read the right content. The most helpful resources for me were the DDIA book [1] and the "Systems Design Interview" YouTube channel [2]. Both are great for breadth and getting exposure to a ton of different concepts -- after that, you can follow your nose (or the book's bibliography) to get depth on whatever you're most interested in. Good luck with it! It's a deep and really fun rabbit hole. I suggest you find a particular type of system that you're really interested in; start pulling on that thread, and you'll inevitably find your way to all kinds of other fascinating systems-design topics as you go. [1]: https://www.amazon.com/gp/product/1449373321/ https://www.amazon.com/gp/product/1449373321/ [2]: https://www.youtube.com/c/SystemDesignInterview https://www.youtube.com/c/SystemDesignInterview
- lunchladydoris 4y agoBig plus-one for the Systems Design Interview channel. I learned a lot from watching those videos (repeatedly) when I was preparing.
- yodsanklai 4y ago> It took me < 20 mock interviews (total cost of < $10K) That's a lot of money!
- yifuyang 4y agoMaybe on my experiens,I learn the system design by think about how to build the system or software in our life ,just like how to build a Uber or an Amazon. If you feel like it's a little hard to do, just try some simple things like a lift or a parking. As you said ,you have a lot of small apps, mabey you could do something to link them together, and build a middle layer service for all the apps. In this progress, you should consider all the part of designing a distrubuted system, it could help you a lot, I guess. Perhaps it's not the best way to improve the ablity for system design, it works a lot on me at least.
- simonw 4y agoDon't underestimate how much what you can learn building small apps will scale up to bigger ones. The great thing about smaller projects is that you can take risks with them. Build something small that uses a message queue. Then do a project that integrates with some web APIs. Then try building something that implements GraphQL. Then try integrating full text search. When you get the chance to work on something bigger I guarantee you'll find this experience incredibly valuable. Larger systems tend to look a lot like smaller systems, but messier and more complicated because more people have been involved in helping grow them as their requirements have changed over time.
- wly_cdgr 4y agoBuild apps and play Zachtronics games
- mikercampbell 4y agoI started a blog to explore this idea! I've built Pokemon Games to learn how to do things on a large scale. I've done Kubernetes, Redis Caching, nearly every flavor of Database (NoSQL, SQL, Graph, etc), and microservices, monoliths, you name it. I'm going to be exploring how to go about it, how to massively over-engineer things for the sake of learning, as well as build minimalistic aspects of the games. There will be `Main Quests` where we build a simple game, and `Side Quests` where we go off the wall and explore new tech. I just started tonight! So it's definitely a WIP https://mikercampbell.gitbook.io/gotta-code-them-all/ https://mikercampbell.gitbook.io/gotta-code-them-all/
- gottacodethem 4y agoHey, just created an account on HN just to say that I love the idea of your project. It rekindled my interest to learn Typescript and the premise of doing a smaller scale pokemon game just seems incredibly interesting and infinitely extendable. I blazed through the first few chapters and am desperate for more. I understand what the next steps should be, but I struggle to put them into non spaghetti code and would love to see your more modular approach on it. Really hope you keep going, this is so fun!
- mikercampbell 4y agoYES! This made my day! I've never screenshoted a HN comment before, but I had to keep this one and hold onto it. This really got me excited! I'm currently working on the Caching (both in memory and with Redis as an option), how to generate Pokemon with random or specific values (like NPC teams need to have hard coded moves and levels, but you want random encounters to have random data) as well as the building the Overworld, with basic keyboard controls, collision detection, and beginning to have an ECS from scratch. I'd love it if you would alpha test my next chapter? And please provide any feedback. Let me know where I'm too verbose, or if the code isn't clear or doesn't work for you!
- gottacodethem 4y agoSounds awesome, would love to test it! Exciting topics coming up! I added an email to my profile where you can contact me
- Yan-solucracy 4y ago
- olalonde 4y agoYou can pretend a small web app is a bigger one with a load testing tool like locusts[0]. If your design is good, it should be able to scale and handle more load. There are some more testing approaches listed here[1]. [0] https://locust.io/ https://locust.io/ [1] https://github.com/asatarin/testing-distributed-systems https://github.com/asatarin/testing-distributed-systems
- jschrf 4y agoPractical ideas off the top off my head: Take a fast moving input data stream, and map it to some slower moving output streams. Use a message queue, a web tier, a worker, and implement private and public caching internally in something like Redis. Implement HTTP caching. Implement backups, failover, and recovery. Create runbooks and checklists. Secure everything with MFA auth for admin-type users and design and implement lesser privileged user access. Design and implement RBAC. Add reporting, logging, fault-tolerance. Make it platform agnostic and support multi-tenancy, i18n, and WCAG. Support and test for HIPAA and GDPR compliance. Document the whole thing. Figure out how to write automated tests for all of these aspects.
- _moof 4y agoI know this isn't really what you asked, but I've administered hundreds of software engineer interviews, and there are two very common mistakes I see when it comes to system design: 1. Not clarifying the problem. The very first thing out of your mouth should be a series of questions that helps you define the requirements more clearly. Identify use cases. Try to understand the scale; questions that start with "how many" are good ones. 2. Not being concrete. For example, I had a design problem I'd give people that usually wound up with them sending lots and lots of messages in real-time from one system to another. But when pressed, very few people were able to describe the contents of those messages in any detail. Just thought I'd pass that along in case it's helpful to you. And I'll second what a lot of other folks here are saying: the best way to learn this is to get experience.
- Fiahil 4y agoAnd I would add : 3. Not being specific about any technologies. Instead of using a "SQL Database" and a "cache", just say "PostgreSQL" and "Redis". It's an interview, if you're not specific, I will start thinking you don't have any experience with Redis or Postgres. If you really don't have any, I will find out anyway.
- Aeolun 4y agoI would think it doesn’t matter? Whether we use redis, memcached or anything else is irrelevant to the point, which is that you want ‘something’ to function as a cache.
- maddynator 4y agoI would advise against it. Two reasons: - if the person interviewing you know the specific tech you picked, you give them an opening to control the interview. They can go anywhere they want and you would likely fall short unless you know the stack in&out - when you pick specific technology, you also have to defend why this one specifically. For ex, why redis and not memcache or why only postgres and not redshift.. If you keep it at sql and no-sql, you can easily defend the answer and control the interview
- s1k3s 4y agoYou don’t actually want that, I think. In practice systems start small, and stuff is added to them gradually. I consider this as a much bigger challenge than designing a “complex” system right from the start. The trick is to be able to keep a system clean over time, not to design it for a year and then just write down the code. So it’s fine to start with your small apps, but instead of throwing it away try to keep adding stuff to it and release more advanced versions say, every month. That being said, there are a few well known examples of systems that are somewhat complex right from the start. Ecommerce comes to mind: build a configurable ecommerce framework that supports multiple stores, multiple vendors, multiple channels, CC and cash payments, multiple currencies, international delivery etc.
- Aeolun 4y agoSystem design interviews have so far been a bit hit or miss for me. All the interviewers seem to be looking for something, but I’ll be damned if I know what it is. I think I’m inclined to incrementally solve potential problems with the system (as introduced by the interviewer), where a lot of these interviews seem to want you to anticipate all issues. So asking lots of questions about what they want is probably a first.
- ledauphin 4y agothis describes my experience as well.
- maddynator 4y agoI know you didn’t ask for this but Me and couple of my friends at big tech who have given and taken 500+ interviews, do mock interviews for each other and references. For reference we do paid 45 mins mock interviews. In case you are interested, dm me and I can share more details.
- omitmyname 4y agoThere’s no dm on hackernews, can you share your email or something?
- jesperlang 4y agoI think you can even take the smallest web app and make it into a more "real world" project. Take for example the classic counter demo. Try adding these features: * i18n/l10n: Display labels in different language and correctly format the counter value for your user (1'000 vs 1.000). A user should be able to switch country * Allow users to register and create their own counters * Store the counter value in database hosted somewhere * Store content stuff (title, labels, etc.) in a headless CMS and integrate with it. * Set up build pipelines for your project * ...and more :)
- amtamt 4y ago* Make this app multi tenant. * Make this app highly available across geographies under heavy use.
- wildekek 4y agoI built a homelab server using a HP Elitedesk running Proxmox. Allows me to experiment with all kinds of tools which facilitate strategies for redundancy and scaling.
- sent-hil 4y agoCheckout highscalability.com, used to have lots of real word scalability issues and solutions back on the day. If you want hands on experience, pick an open source app in the language you know and deploy it somewhere and load test till it breaks and see which part breaks first. It could be your load balancer can’t handle that many connections or you app server rubs out of memory or the db comes to a crawl. The more real world you can make load test queries the better. At the very least you’ll get hands on experience.
- PascalW 4y agoHighscalability.com was great! I still follow their RSS feed but there's not a lot of new content nowadays. If someone knows a similar resource I'd love to hear about it!
- a_c 4y agoFor what purpose? Are you a small business owner that preparing for going viral one day? Keep improving your system bit by bit. Maybe add a caching layer today, load balancer tomorrow, a job queue somewhere down the road and scale up your database now and then. And probably YAGNI imo. If for job hunting, other comments had better suggestion
- andreskytt 4y agoI always recommend to read the classics (in addition to other excellent advice given here). Brooks, for sure, but also Vitruvius is _very_ relevant to designing large software systems. Then jump into the MIT System* ocean: system architecture (Crawley) gives you a framework for thinking about large and complex things, system safety (Leveson) a good framework for making things safe. Add some MIT product design and a ton of failing on your arse and you should be understanding you don’t still a thing in no time at all
- z3t4 4y ago1. Build a naive system (without taking into account any requirements whatsoever) 2. Put the system in production 3. Get surprised that it works 3b. Or learn why it doesn't (likely not what you expected and would have designed for in stage 1) Questions for stage 3: Do all customers/clients really need to be able to access all other customers/clients state/data in parallel and real time ? What can be cached ?
- buggythebug 4y agoWith your hands on it....
- googletron 4y agoI write architecturenotes.co for this specific reason. Check it out.
- ransom1538 4y agohttps://www.youtube.com/watch?v=bUHFg8CZFws https://www.youtube.com/watch?v=bUHFg8CZFws ^ this guy is amazing. His systems are implemented all the time.
- danrl 4y agoYou learn large scale system design via real world application, being in the room when it happens, and from closely working with folks who are already practicing it. This kind of work is sometimes as much art as it is science, highly specific to the situation at hand and requirements of the system to be designed. It absolutely bothers me that the resources out there are few and far between. It is hard to change that. I encountered occasionally resistance in organizations to share more openly the process, e.g. I suggested video taping it and uploading the video as a start. Naturally, plenty of confidential information can be disclosed in such design sessions, so enthusiasm about sharing recordings is rather low, even when everyone in the room agreed to be taped in the first place (which in itself is almost impossible). I am bothered by engineering topics that have this „tribalism“ way of education. In networking one of these areas is BGP. No one lets you near Border Routing until you can do it perfectly, because of it potentially catastrophic impact (Pepperidge Farms remembers Pakistan Telecom hijacking YouTube!). When I tried to solve that one I ended up spinning up a whole ISP which’s sole purpose is to play with and break BGP. [1] For system design I haven’t found a solution yet, ideas welcome. In the meantime, all you can do is read the little that is available (e.g. [2]) and try to talk to as many practitioners as possible, asking them to share or simulate a session privately. 1: https://www.nonattached.net https://www.nonattached.net 2: https://cloud.google.com/blog/products/management-tools/sre-principles-and-flashcards-to-design-nalsd https://cloud.google.com/blog/products/management-tools/sre-...
- kodah 4y agoI'll second that the best way to get better is to be a practitioner. Part of the reason that there's not more material on systems design is because the way we design systems is highly dependent on core systems that pre-exist a new system. You can learn all the things on paper about layer 8 vs layer 4 load balancing, how to build an effective distributed cache, how to building a decentralized rate limiter, etc but all of these things are highly dependent on what exists prior, and knowing how to work in non-greenfield components reflects an internal familiarity with them. The other side to systems design is more analogous to producing a map of the world; eg: documenting systems as you work on them. When I was a new engineer, this is how I learned systems design. Every new system I encountered I would begin to model. This had the added benefit of teaching me UML and how to make designs that highlight the important parts.
- foxhop 4y agolearn how the framework you use works. find one that better fits your model of the world. build a big app on top of this framework. do this with bigger & bigger end vision but with a doable MVPin mind. look at good examples. open source the result, https://www.makepostsell.com/ https://www.makepostsell.com/ (python, Pyramid, sqlalchemy) https://www.remarkbox.com https://www.remarkbox.com
- shroompasta 4y agothere are many answers to this, but i'll try to give a, although biased, straightforward example. - learn docker / docker-compose - tie a websocket server, a task queue, and 2-3 http microservices together - you don't have to have many resources, maybe 4-5 endpoints that go through all services - have a client javascript front like react - (bonus for grpc communication for intermediary connections between microservices) - try to break it/ fix it as much as you can. - along the way you'll introduce yourself to timeouts, retries, rate limiting, and other secure practices. watch guarav sen or hussein nasser on youtube - they are extraordinary resources for aspiring and even competent backend architects
- debrice 4y agoThe best hands-on practice was when I had to build my own, nobody to tell me to cut corners and time to do things right. It's important to do it right to know how to do it wrong (most company will prevent you from doing things right because of time/budget constraints). Ask yourself: - What constitute a _good_ infrastructure? - Something flexible/adaptable ? - Something predictable ? - Something resilient ? - Something easy to monitor ? - Something else ? - How do you prioritize these, who gets to decide which one matters most... Architecture is asking a lot of questions, inviting others who will benefit/use your work into the decision making process. One thing that I learned that is still helpful to me today is try to push as many decisions as possible to later, keep the door open for futur choices. Every system architecture is part invention, part discovery. As you put together your foundation, new requirements/restrictions will appear and you'll be happy to have the freedom to make some of your decisions then.
- fillest 4y agoIf by "large" you mean e.g. "under relatively high load" then you can simulate this load and learn to deal with it. Populate your databases with a lot of generated data. Use load testing tools. Add latency and faults to different parts of the system (you can even inject errors into storage system (e.g. device-mapper)). At some point you even can rent some big servers (e.g. cloud) to test you problems and ideas - the cost of learning can be very effective. Make some checklists and iterate over all the components: - what happens if this stuff fails (and how to test it, how to analyze it) - what attack surface that stuff has - how to scale if it receives x10 requests or becomes x10 bigger - how can you explain to a new coworker how it works, how all the decisions were made It will rapidly give you the real understanding and practice. System design is about dealing with problems, making compromises. It is very hard to make an effective book (probably even impossible - it should probably be an interactive course at least) that will walk you through this process, not just throw a bunch of "patterns" at you (which is not useful and can infect you with the shallow cargo-culting that our whole industry is so full of).
- iamgopal 4y agoBy making a system ? Ultimately by knowing the problem hands on, one would be able to understand ( or appreciate ) the solution
- dominotw 4y agoAre you trying to pass "system design interviews" . Those are more about putting on a oscar worthy performance desiging instagram with billion users in half hour. You just have to memorize all the patterns like cdn, dbsharding, cap theorem , geolocation alogrithms, queues and logs ect.
- valbaca 4y agoWork through these books, then you start looking at any random app or system and can start from there: - System Design Interview – An insider's guide: https://smile.amazon.com/gp/product/B08CMF2CQF https://smile.amazon.com/gp/product/B08CMF2CQF - System Design Interview Vol 2: https://smile.amazon.com/System-Design-Interview-Insiders-Guide/dp/1736049119 https://smile.amazon.com/System-Design-Interview-Insiders-Gu... - Designing Data-Intensive Applications: https://smile.amazon.com/gp/product/1449373321 https://smile.amazon.com/gp/product/1449373321 - System Design Primer: https://github.com/donnemartin/system-design-primer https://github.com/donnemartin/system-design-primer Especially: https://github.com/donnemartin/system-design-primer#how-to-approach-a-system-design-interview-question https://github.com/donnemartin/system-design-primer#how-to-a... - The Architecture of Open Source Applications: http://aosabook.org/ http://aosabook.org/
- ChrisMarshallNY 4y agoI've done a couple. I'm working on one, right now. I suspect that people would take issue with the exact implementations I use, but they tend to work fairly well, and have lasting power (I wrote an API for imaging devices in C that was still in use, 25 years later). I wrote a backend system that is currently in use, worldwide, by thousands of people (I wrote it about twelve years ago), but has been taken over by a new team (I hardly have anything to do with it, anymore). I also wrote a few clients; most of which have been retired. The system I'm working on now, leverages it, and mixes it with another one I wrote (just a couple of years ago). My way won't win Buzzword Bingo, but it WFM. YMMV. I'm happy to share, but I've found that not everyone wants to do things the way I do, so I'll do so out of the public eye. I have a few generic things, here[0], that I've written, over the years, talking about some of my techniques. [0] https://littlegreenviper.com/miscellany/ https://littlegreenviper.com/miscellany/
- mandeepj 4y agoIt takes time. Keep practicing by - re-reading, doing hands-on exercises. There are many fabulous resources shared by our fellow HNers. I think you got what you asked for! Couple points from me: Have someone conduct your mock interview, once you think you are ready. Also, don't hesitate from appearing in an interview at a company which you don't plan to join. Another good way to practice and demonstrate your skills.
- electrondood 4y agoGrokking the System Design Interview is a good overview of the available templates/patterns/solutions. After that, block off 60 minutes with a whiteboard and ask yourself "How would I build $EXISTING_SERVICE from scratch?" Repeat regularly.
- itisit 4y agoSystem design is very easy because you're always inheriting a prior design that exists in actuality or borrowing from a model. Just make sure the new design lowers cost, reduces complexity, improves security, and/or unlocks potential value. ;) The best way to get hands-on practice is to do just that. The tech part of system design is nothing; it's dealing with an organization and its myriad biases, politics, and reservations that'll teach you the most about the practice.
- weba11y 4y agoI know you're asking for hands on, but if you want reading material: https://www.amazon.co.uk/System-Design-Interview-insiders-guide/dp/B08B35X2ND/ref=asc_df_B08B35X2ND/ https://www.amazon.co.uk/System-Design-Interview-insiders-gu... and https://www.amazon.co.uk/Designing-Data-Intensive-Applications-Reliable-Maintainable/dp/1449373321/ref=asc_df_1449373321/ https://www.amazon.co.uk/Designing-Data-Intensive-Applicatio... are great
- mvaliente2001 4y agoThe thing that helped me the most to design maintainable systems was the use of Clean Architecture. In particular, the [Cosmic Python Book](https://www.cosmicpython.com/ https://www.cosmicpython.com/), which offers practical examples on how to implement Clean Architecture in Python, and which design patterns are more useful to keep every layer independent.