Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you use the wrong tools, everything looks like a disaster.

Microservices on AWS with lambda+dynamo+auroa+api-gateway work very well. There's built in transparency. There is logging. You can set everything up with terraform.

Terraform makes the setup trivial. Compared to monoliths that I've seen that involve a lot of brittle manual steps, it's not even a competition. AWS Lambda with xray and other logging tools makes tracking down errors trivial. I have yet to see a monolith with anything comparable.

"Oh but I get a stack trace in my monolith" is false advertisement. How useful is that stack trace when the stack is corrupted? Or when memory is corrupted because one line in another part of the monolith has an error that slowly screwed up some datastructure in another part of the monolith? I'll take Lambdas that are all short, totally isolated, and easy to understand, any day. Debugging and understanding is much harder with a monolith.

And yes. To test, you need to bring up the entire working application. Just like you need to bring up the monolith. Oh? You mean, most people who test monolith don't bring them up, they just test some mocked version of some module in isolation? Well, they're probably testing the testing framework itself more than the monolith. With localstack you can bring up the entire AWS setup locally, automatically, run component and end to end tests. It's far more testable than a monolith. And far more obvious when an interaction is not tested.

Monoliths are dead. Stop writing them. And start learning modern tooling.



The way you use functions on Amazon sounds like it could be a monolithic development style to me. Independent functions is still a monolith if they use the same database (IMO). It's micro-services if you start to use different databases and have async state between them, which is orthogonal to what you bring up here.

What you bring up here is a discussion of execution environments for your code -- similar to a discussion of the best OS or programming language -- not whether the code is monolith or micro-service.

50 Amazon Lambda functions that all use the same database / data stores and understands the same data directly without going through APIs is definitely a monolith in my book.

PS: If you first allow for the possibility of a completely odd event like a corrupted stack trace (what are you programming in, pure C?) then to be fair I think you have to allow for the possibility of a bug in Lambda leaking state across invocations too.


If anything, it's great for the resume




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: