5. 5CONFIDENTIAL
5
AUTO CONFIGRATION − NO MORE BOILERPLATE CODE
In information technology, a boilerplate is a unit
of writing that can be reused over and over
without change. By extension, the idea is
sometimes applied to reusable programming as in
"boilerplate code."
6. 6CONFIDENTIAL
6
ACTUATOR
ID Description Sensitive
Default
actuator Provides a hypermedia-based “discovery page” for the other endpoints. Requires Spring HATEOAS to be on the classpath. true
autoconfig Displays an auto-configuration report showing all auto-configuration candidates and the reason why they ‘were’ or ‘were not’
applied.
true
beans Displays a complete list of all the Spring beans in your application. true
configprops Displays a collated list of all @ConfigurationProperties. true
docs Displays documentation, including example requests and responses, for the Actuator’s endpoints. Requiresspring-boot-actuator-
docs to be on the classpath.
false
dump Performs a thread dump. true
env Exposes properties from Spring’s ConfigurableEnvironment. true
flyway Shows any Flyway database migrations that have been applied. true
health Shows application health information (when the application is secure, a simple ‘status’ when accessed over an unauthenticated
connection or full message details when authenticated).
false
info Displays arbitrary application info. false
liquibase Shows any Liquibase database migrations that have been applied. true
logfile Returns the contents of the logfile (if logging.file or logging.path properties have been set). Only available via MVC. Supports the
use of the HTTP Range header to retrieve part of the log file’s content.
true
metrics Shows ‘metrics’ information for the current application. true
mappings Displays a collated list of all @RequestMapping paths. true
shutdown Allows the application to be gracefully shutdown (not enabled by default). true
trace Displays trace information (by default the last few HTTP requests). true
9. 9CONFIDENTIAL
9
HEALTH
Name Description
CassandraHealthIndicator Checks that a Cassandra database is up.
DiskSpaceHealthIndicator Checks for low disk space.
DataSourceHealthIndicator Checks that a connection to DataSource can be obtained.
ElasticsearchHealthIndicator Checks that an ElasticSearch cluster is up.
JmsHealthIndicator Checks that a JMS broker is up.
MailHealthIndicator Checks that a mail server is up.
MongoHealthIndicator Checks that a Mongo database is up.
RabbitHealthIndicator Checks that a Rabbit server is up.
RedisHealthIndicator Checks that a Redis server is up.
SolrHealthIndicator Checks that a Solr server is up.
13. 13CONFIDENTIAL
13
SPRING CLOUD
• Distributed/Versioned Configuration Management
• Service Registration & Discovery
• Routing & Load Balancing
• Fault Tolerance (Circuit Breakers)
• Monitoring
• Concurrent API Aggregation & Transformation
• Distributed messaging
• Spring Cloud Config
• Spring Cloud Netflix
• Spring Cloud Bus
• Spring Cloud for Cloud Foundry
• Spring Cloud Cluster
• Spring Cloud Consul
• Spring Cloud Security
• Spring Cloud Sleuth
• Spring Cloud Data Flow
• Spring Cloud Stream
• Spring Cloud Stream Modules
• Spring Cloud Task
• Spring Cloud Zookeeper
• Spring Cloud for Amazon Web Services
• Spring Cloud Connectors
• Spring Cloud Starters
• Spring Cloud CLI
MAIN PROJECTS PATTERNS
16. 16CONFIDENTIAL
16
SPRING CLOUD CONFIG
FEATURES
MAJOR FEATURES
• Version control
• Changing live
• HTTP, resource-based API for external configuration (name-value pairs, or equivalent YAML content)
• Encrypt and decrypt property values (symmetric or asymmetric)
• Embeddable easily in a Spring Boot application using @EnableConfigServer
• Bind to the Config Server and initialize Spring Environment with remote property sources
• Encrypt and decrypt property values (symmetric or asymmetric)
21. 21CONFIDENTIAL
21
SPRING CLOUD BUS
An event bus for linking services and service instances together with distributed messaging.
Useful for propagating state changes across a cluster (e.g. config change events)
26. 26CONFIDENTIAL
26
CLIENT SIDE LOAD BALANCER: RIBBON
Ribbon provides a rich set of features including:
• Multiple built-in load balancing rules:
—Round-robin
—Average response-time weighted
—Random
—Availability filtered (avoid tripped circuits or high concurrent
connection counts)
• Custom load balancing rule plugin system
• Pluggable integration with service discovery solutions (including
Eureka)
• Cloud-native intelligence such as zone affinity and unhealthy
zone avoidance
• Built-in failure resiliency
29. 29CONFIDENTIAL
29
CLIENT SIDE LOAD BALANCERROUTER AND FILTER: ZUUL
Netflix uses filters dynamically loaded into Zuul to perform the following functions:
• Authentication and security: Identifying authentication requirements for each resource and rejecting
requests that do not satisfy them.
• Insights and monitoring: Tracking meaningful data and statistics at the edge in order to give us an
accurate view of production.
• Dynamic routing: Dynamically routing requests to different back-end clusters as needed.
• Stress testing: Gradually increasing the traffic to a cluster in order to gauge performance.
• Load shedding: Allocating capacity for each type of request and dropping requests that go over the
limit.
• Static response handling: Building some responses directly at the edge instead of forwarding them to
an internal cluster.
• Multiregion resiliency: Routing requests across AWS regions in order to diversify our ELB usage and
move our edge closer to our members.
35. 35CONFIDENTIAL
35
SPRING CLOUD STREAM
Spring Cloud Stream is a framework for building message-driven microservices. Spring Cloud Stream builds
upon Spring Boot to create DevOps friendly microservice applications and Spring Integration to provide
connectivity to message brokers.
By adding @EnableBinding to your main application, you get immediate connectivity to a message
broker and by adding @StreamListener to a method, you will receive events for stream processing.
37. 37CONFIDENTIAL
37
SPRING CLOUD SLEUTH
Spring Cloud Sleuth implements a distributed tracing solution for
Spring Cloud, borrowing heavily from Dapper, Zipkin and HTrace. For
most users Sleuth should be invisible, and all your interactions with
external systems should be instrumented automatically. You can
capture data simply in logs, or by sending it to a remote collector
service.