Spring boot: How should I deploy my microservices [closed] - spring-boot

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
So at first I built a simple monolith application and deploy it using docker and nginx (for reverse proxy only). for now I have plan to separate each services because some services require a lot of time and IO to do their jobs. I have researched about it and I know some components that I'll need like spring cloud eureka, service discovery and etc. I'm a bit confused because I only use docker and nginx if I add these components do I still need nginx on top it? can you give me an example of structure that I should know or apply to my project.

In your first iteration of the refactoring you can do without Service Discovery:
create a SpringBoot app for each microservice
services talk to each other directly (no need to have Nginx), also without Service Discovery it means that you hardcode (or store in a property file) the URL of the endpoints
deploy NGINX in front of the application/service which serves the end users (ie a Web Application)
Once you have validated your new architecture (splitting the responsibilities across the microservices) you can introduce Service Discovery (Eureka) so the endpoints are no longer hardcoded.
Nginx is pretty light so it can also be used for handling internal traffic if you like, but at this point you architecture should start considering volume of traffic and number of components to decide what works better.

Related

gRPC based microservice architecture for inter-service communication [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am trying to comprehend how does the inter-service communication works when implementing these services using gRPC. While there are lot of articles out there covering the basics about getting started with gRPC and how it can be compiled to multiple different languages. I am still kind of missing some guidelines on how best should each service in microservice architecture communicate.
My general understanding, after following through something like this : https://www.oreilly.com/library/view/practical-grpc/9781939902580/
That if I need to use gRPC in microservice architecture where inter-service communication will be gRPC based each service will essentially (and as needed) should do server and client stub implementation to talk to other services.
So for me it would look something like this
And if above is the case, then getting each of these services deployed in K8s environment seems like quite some effort esp. with making each service discoverable in the entire cluster.
Some additional notes
I am developing with Go primarily and using protobuf for defining proto files.
It'll be greatly helpful if someone could comment on this or has a resource that I can go through to better my understanding.
Thanks!
Your understanding is correct. If you want to have separate services that talk to each other remotely in kubernetes, you will have to deploy them (helm could help here) and you have to create services for cluster discovery.

Microservices calling other external services [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
My apologies as the realm of this question is very broad. We are starting on a new journey of defining microservices and starting with a DDD (We are based off .NET tech stack but I reckon for purposes of discussion this topic is independent of the stack)
At this moment, we have roughly identified the domains and we have defined layers like Domain Layer, Infrastructure Layer, Application layers. So for example if we have a customer / client we have defined the following layers for like so. The point where we are really getting confused is how this microservice with other service which are not microservice per se. Say for example, if there is a rule that a CreateCustomer command, as a part of its creation, needs CreditScore verfication and if this service is provided by some external provider via a facade that could be written in house, how should a microservice communicate with such a service?
Are there any patterns or any recomendation re how such microservice to other services communication needs to be defined? Any recomendations / suggestions are welcome.
services dependency manager
+ protocol (REST/RPC/native API's)
+ circuit breakers
just like any other micro/service would do.
Don't understand why (external) micro/service is not just another micro/service for your system.

How to run multiple Golang apps on a dedicated server? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm a Go newbie and I'm stuck trying to figure out how to deploy my apps on a dedicated server.
When I worked with PHP I used the standard setup:
But I'm confused as to how I'm supposed to deploy my Go apps.
I know I can run a single app on port :80 but how do I run multiple apps?
Is this the general idea:
Or should I be using something like this:
Can someone clarify the way most Go developers deploy their apps?
Thanks!
I'd highly recommend going with Caddy. You can set up you server with all the apps on different ports (esp. higher ports i.e. 1024 and up, so they don't need to be root), and then use proxy directives to forward traffic to your apps and such. As a bonus, you also then get free Let's Encrypt certificate support!
https://caddyserver.com/docs/proxy for more on the proxy directive
If you need multiple apps to serve HTTP requests, you should definitely consider using Nginx as a reverse proxy. You can forward all requests on a given route, say /api to one service and /ui to a second service, provided they are bound to different ports.
You might want to look a Traefik (https://traefik.io/), a go based web proxy

Setting up development environment in micro-services architecture [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
We are moving towards developing a web app in a micro-services architecture.
We thought about running the services behind a API gateway that will handle authentication and will proxy the requests to the appropriate services.
We have encountered a problem while setting up the development environment. How can we develop a service in a local machine (laptop) and test and run it in a way that is similar to the production (behind the gateway)?
Consider the following requirements:
Inter process communication (B2B)
Manage and sync different versions
Access the service with authentication token (produced by the gateway)
Difficulty to setup development environment for microservices is proportional to the number of microservices. I have a running setup on my laptop with 2 microservices along with eureka, zuul gateway with oAuth2, an authorization server and spring cloud config. Beyond this I have not tried as it will start becoming unmanageable.
In this case it is better to have the development environment on cloud. You can choose any cloud provider and avail a free subscription for sometime. For eg. Amazon gives you 750 hours of linux time free for a month. You can create any number of instances as you need(with minimal cost after free usage).

ServiceMix ESB as Bus or Container? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Should we use ServiceMix ESB as bus (i.e. communication channels) or as container to host services?
My current company host services (JMS/SOAP/RESTFUL etc, built by Java) in their own separate containers/servers etc, then each of these communicate to each other via the ServiceMix ESB, by adding extra bindings.
Is this a correct approach?
Should we migrate all existing services to become OSGI bundles, then host on ServiceMix?
I'd say it depends more on your current system land-scape. How do you handle failover and such. I personally would have all my service on that machine and if a routing is needed would try to do an "in-memory" routing instead of doing external service calls, would be much faster. On the other hand this again depends purely on how your application stack is working and if you have "time-critical" service calls that would perform better if run inside the same jvm. So actually there can't be a "silver-bullet" approach on this. As usual it depends ...

Resources