Grokking Microservices Design Patterns
Vote

0% completed

Sidecar Pattern: An Example

This section shows the Sidecar Pattern in a worked example.

Creating the Main Application

First things first, we need an application. Let's create a simple Java web application. This application will expose a RESTful API and will serve as our main application.

Here is a simple Java web service using Spring Boot:

import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @SpringBootApplication

.....

.....

.....

Like the course? Get enrolled and start learning!
M

Mohit Malviya

· 2 years ago

When app and sidecar will be deployed within same container then how we will be scaling the sidecar and not app otherwise again we need to scale everything like monolithic. If this is deployed separately then this sounds reasonable

Show 2 replies