microservice architecture
Make Developing software is easier, cheaper, faster and smarter.
Agenda
Scope - Why and How , Biz-Tech Drivers
Domain Concerns - Technology Options
Best Practices - Design/Code/Test/Deployment
API Governance - Elements and implementation. Spring Boot Application, Demo
Dev-Ops - Culture, Practices
Microservices
Is an architectural style that structures an application as a collection of loosely coupled services, which implement business capabilities that can be deployed and scaled independently
Something strange is happening ...
- The rise of the application cloud
- End of the road for monolithic software architectures
- De-productisation through microservices
- Infrastructure shifts to ‘serverless’ event-driven programming models
- Rules of software distribution being rewritten
TRENDS
Scope
- Defining process of publishing, promoting, and overseeing APIs in a secure, scalable environment - Policy driven approach
- API Key life-cycle management, tenant quota management and metering of APIs, Managing, securing, and mediating API traffic
- Ensuring that developers are productive.
- Define domain concerns and technology stack selection for managing APIs
- Define best practices for API design/development and ensure they are being followed. - Quality Gatekeeper of API
- Ensure to limit the use of technologies that are tied to particular vendor as much as possible with preference open source.
Goals
-
Stateless, independently deployable and scalable
-
Rapid development, provisioning, and deployment of artifacts with independent life cycle
-
RESTful to be easily consumed by modern client JS frameworks.
-
Services APIs based on OpenAPI standards
-
API governance where in various service concerns are managed.
-
APIs need to be based on modern tech stack and should be quick to adapt to changes and services easily amenable.
-
Cloud friendly APIs (should be able to leverage the cloud standards), Easy to implement cloud design patterns. Services are SaaS friendly with the ability to turn into on-premise easily.
-
Efficient & scalable storage/data transfer with high volume/velocity and the variety of data.
Economic
- API-first development strategy is the state of art, provides unprecedented up-sell opportunity (disruptive, as ~30 million developers can write new way applications with multiplier effect)
- Developer first, then build products has proved to be good strategy for various consumption methods (web, mobile, 3rd party apps and in house products)
- Automated faster releases will improve agility enormously,
- Bounded contexts to limit cognitive load. Increases the adoption rate
Technology
- Independently deploy-able/testable services with independent release cycles
- Makes it easy to scale with inherent stateless architecture
- Works well with large teams, Easy to manage the releases
- Trend for SaaS solutions is to develop API as for all internal and external usage as well with API as scaling with that remains the only credible option
- Quicker technology adoption and increases happiness quotient for developers
Drivers
Economic
- Enables diverse technologies to co-exist,new busines oppurtunity, speed to market, data provided by API can be mixed and remixed as per business needs to provide various visualizations, adapt to new trends faster.
- Eat your own API - Same APIs for internal as well as external. reduces the cost with early feedback cycles
Technology
- It builds on loosely coupled but highly cohesive set of services.
- Eliminates long-term commitment to a technology stack.
Drivers
"API becomes digital glue" - Forrester.
Technologies
Selecting Best persistent model - Options
Data really powers everything that we do. —Jeff Weiner, CEO of LinkedIn
- Polyglot persistence
- Autonomous Tech Teams
- Voluntary adoption,
- Lot’s of small apps
ElasticSearch
Low latency for indexed read (return set of documents)
Low latency for random search (return set of documents)
Low latency for full text and aggregates queries (return facets)
MySQL/Mongo
Low latency indexed read
High latency random search
Dynamic schema - Mongo
Controlled schema and transactions - MySQL
Redshift/Vertica
High write throughput
Low latency aggregation queries
S3
High read throughput (MB/sec)
Moderate latency single document Read
Everything in few words
Designed with the same next generation technologies powering Netflix, Amazon, LinkedIn viz...
MODERN, CLOUD-SCALE TECHNOLOGY
Lightening fast performance regardless of number of users or data volume.
FAST INGESTION, SEARCH, EXPORT
Dramatically improve throughput and response time.
NO SINGLE POINT OF FAILURE
High availability with truly distributed processing.
MT AWARE MANAGED SERVICES
It is estimated TCO of these services reduces by 40-60%
Its all about "scaling" at all levels
Micro services enable faster innovation with frequent independent release lifecycle and delivery of quality software
Monolith API benefits from economy of scope, micro service API benefits from economy of scale.
MICROSERVICES
Micro services enable faster innovation with frequent independent release lifecycle and delivery of quality software
Monolith API benefits from economy of scope, micro service API benefits from economy of scale.
Micro services enable faster innovation with frequent independent release lifecycle and delivery of quality software
Monolith API benefits from economy of scope, micro service API benefits from economy of scale.
Micro services enable faster innovation with frequent independent release lifecycle and delivery of quality software
Monolith API benefits from economy of scope, micro service API benefits from economy of scale.
Micro services enable faster innovation with frequent independent release lifecycle and delivery of quality software
Monolith API benefits from economy of scope, micro service API benefits from economy of scale.
Micro services enable faster innovation with frequent independent release lifecycle and delivery of quality software
Monolith API benefits from economy of scope, micro service API benefits from economy of scale.
Micro services enable faster innovation with frequent independent release lifecycle and delivery of quality software
Monolith API benefits from economy of scope, micro service API benefits from economy of scale.
Recap
- Single business capabilities
- Small teams
- Components as service
- Domain driven design
- Product focussed
- Decentralized Data
- Infrastructure Automation
- Design for failure
- Evolutionary Design
- Rapid Provisioning
- Monitoring
- Rapid application development and deployment
- DevOps culture
Traits
Small Teams
- Experts in that domain, Focus on Single purpose
- Cross functional - Have all skill sets for complete solution
Test Driven Development, CI and Deployment
- Regression, Fail fast
- Merciless Refactoring, Performance improvement
- Fast iterations
Dev-Ops
- End to end design/development/deployment and retirement
- Independently deployed and scaled.
Orchestration
API - Gateway
- Discovery Service
- Security
- API Key Life cycle management
- Tenant Quota Management
- Monitoring Service
- Metering Service
- Manage/Documentation of RestFUL APIs
Orchestration Vs CM
Chef, Puppet, Ansible, and SaltStack are all “configuration management” tools, which means they are designed to install and manage software on existing servers.
CloudFormation and Terraform are “orchestration tools”, which means they are designed to provision the servers themselves, leaving the job of configuring those servers to other tool
Although they can be complimentary there is lot of over-lap and each of them stepping into other's shoe, given the scale/hardware/team requirement ofa particular company, one need to invest one of the above approach.
infrastructure-as-code
Copy of MicroServices - Introduction
By Praveena Manvi
Copy of MicroServices - Introduction
- 392