Microservices

Introduction and case study

Lets get introduced

About Srijan

  • India’s largest Drupal company

  • 100+ Drupal and QA experts

  • Spread across multiple offices

  • Growing number of Acquia certified Drupal engineers

  • Among WorldBlu's most democratic workplaces

Introduction

  • No proper definition
  • No guidelines for implementation
  • Alternative to monoliths

Monolith v/s Microservices

Characteristics of Microservices

  • Components and Services
  • Organised around business capabilities

Conways's Law

Any organisation that designs a system will produce a design whose structure is a copy of the organisation's communication structure

Principles

  • Captures business domain
  • Isolate failures
  • Deploy independently
  • Culture of automation
  • Evolving

Postel's Law

Be conservative in what you send, be liberal in what you accept

CAP Theorem

It is impossible for a distributed computer system to simultaneously provide all three of the following guarantees:

  • Consistency (all nodes see the same data at the same time)
  • Availability (a guarantee that every request receives a response about whether it succeeded or failed)
  • Partition tolerance (the system continues to operate despite arbitrary message loss or failure of part of the system)

How big should a service be?

This question was answered by Amazon as

Actually there is no underline rule for this!

Example architecture

  • Web interface

  • User management

  • Content entry

  • Notifications

  • Blocks

  • Search

Microservice for download

Requirement

  • Downloads upto ~4GB
  • Concurrent downloads ~20 users
  • Number of files ~1000
  • Needed to present the zip
  • Cloud hosting

Drupal simply gave up!

Revised results

  • Downloads upto ~40GB
  • Concurrent downloads ~30 users
  • Number of files ~3500
  • Zip created and uploaded back to AWS S3 for user to download from. Saves bandwidth
  • Still on cloud hosting

Drupal simply rules!

Benefits of this approach                         

  • Venturing into new technologies without compromising on quality
  • Reduced risk of downtimes
  • Independent teams can share responsibility of an application
  • Well built micro-services allow better management of resources

Thanks!

Building Microservices

By Arijit Dutta

Building Microservices

  • 2,032