67 points by sysengr09 11 months ago flag hide 23 comments
johnsmith 11 months ago next
Great topic! I'm also working on a similar project. Here are some tips I've learned along the way:
jane123 11 months ago next
Thanks for sharing, @johnsmith! Can you tell us more about your infrastructure?
johnsmith 11 months ago next
@jane123, Sure thing! We're using Kubernetes for container orchestration, and for the database, we're using a distributed database to handle large amounts of data and ensure availability. I have also been looking into using gRPC for communication between the microservices.
jane123 11 months ago next
@johnsmith, A distributed database makes sense. Have you considered using Apache Kafka as a message queue for decoupling the services and handling load?
containerguru 11 months ago prev next
@johnsmith, you might want to consider compartmentalizing your services and enforcing strict isolation, rather than just deploying on the same host. This leads to better performance and increased scalability due to the product teams focusing on their individual pieces.
johnsmith 11 months ago next
@containerguru, that's a great point. We'll keep that in mind when designing the system.
techexpert 11 months ago prev next
I'd recommend using Kubernetes for container orchestration and Istio for service mesh. They both have great support for microservices and manageability.
programmer1 11 months ago prev next
Considering that you want to build a scalable and distributed system, I would recommend using a service-oriented architecture and building REST APIs for the microservices.
automated_tool 11 months ago next
There are alternatives to REST, though. Consider looking into GraphQL as a more efficient way to query data in a distributed system. Apollo is also a good option for its client-side libraries and server-side framework that enables real-time updates from server to client.
jane123 11 months ago next
@automated_tool, Interesting, thanks for sharing! I'll take a look at GraphQL.
programmer1 11 months ago next
@jane123, another cool feature of GraphQL is its support for subscriptions, allowing you to implement real-time functionality easily.
jane123 11 months ago next
@programmer1, wow, this keeps getting better and better! Thanks for adding on to @automated_tool 's comment.
devopsengineer2 11 months ago prev next
In terms of load balancing, using NGINX or HAProxy as a reverse proxy can rout requests effectively to the appropriate service instances.
jane123 11 months ago next
@devopsengineer2, what do you think about using a cloud provider's load balancer?
devopsengineer2 11 months ago next
@jane123, a cloud provider's load balancer can be beneficial as they are usually more dynamic, but in some cases, customization is needed and a self-hosted load balancer is more suitable.
containerguru 11 months ago prev next
@devopsengineer2, self-hosted load balancers offer the advantage of being transparent and customizable based on the user's organization. However, it introduces complexity and requires maintenance.
netadmin5 11 months ago prev next
Remember to consider the impact of network latency and the importance of caching to minimize the response time. Distributed caching can be useful in addressing these issues.
jane123 11 months ago next
@netadmin5, thanks for the reminder. Which caching technologies would you recommend?
netadmin5 11 months ago next
@jane123, Redis, Memcached, or Hazelcast are the most common choices. They all provide a variety of use cases and extensive documentation.
realtimeengineer 11 months ago prev next
If you're considering using real-time messaging in your system, take a look at NATS. It's a lightweight and high-performance framework that supports messaging, distributed data, and real-time APIs.
jane123 11 months ago next
@realtimeengineer, that sounds exactly like what I need! Thanks for sharing.
testdriven 11 months ago prev next
When it comes to unit and integration testing, the microservice architecture can result in a fantastic explosion of test cases. Automate your test suites as much as possible to ensure quick delivery and bug squashing.
jane123 11 months ago next
@testdriven, thanks dor the reminder! That's definitely an often overlooked part of microservice development.