Theme-Logo
  •   .Net
    •   C Sharp(C#)
    •   Web API
    •   Micro Services
    •   ASP.Net
    • ASP.Net MVC
    • .Net Core
  •   Database
    • SQL Server
    • Oracle
    • PostgreSQL
  •   jQuery
    • jQuery Tutorials
    • jQuery Plugins
    • jQuery UI
    • More on jquery
  •   Tutorials
    • Microservices Tutorials
    • DotNet Core Tutorials
    • PostgreSql Tutorials

Web API vs Microservices

We had already discussed about Microservices in last article. So, as topic describes, we will be looking into difference between Microservices and Web APIs.

What are Web APIs

An API is some kind of interface/application which has a set of functions that allow programmers to access specific features or data of an application, operating system or other services.

Web API as the name suggests, is an API over the web which can be accessed using HTTP protocol. Please keep in mind that Web API is a concept and not a technology.

What are Microservices

Microservices are small form of action ('Micro' means tiny/small and 'Services' means actions) which can get your work done. Microservice is an architectural style that structures an application as a collection of services that are:

  • Highly maintainable and and easily testable
  • Organized around business capabilities
  • Loosely coupled
  • Fault isolation
  • Independently deployable
  • Owned by a small team
  • Web APIs vs Microservices: Real life example

    To make it easier for you to understand, lets take an example of any e-commerce site. You might be noticed while you visited any ecommerce site like Amazon that there are several activities aka request for service like login, searching for product(s), adding/removing product(s) to cart or wish list and so on.

    If we think of application perspective:

  • When you login, transfer of username and password takes place which Authenticate and Authorize the existence of your account with the Ecommerce site.
  • When you search for a product, it returns a list of options which matches the product name or type of product you searching for.
  • If you want to buy the product you add it to your cart and do a checkout, selects your billing & delivery details and do the payment. And then you receive an invoicing mail.
  • DotNet Palace: Microservices VS API

    Now let us look into Web API (REst full API),for the same service examples I considered to explain Microservices.

  • Service for user authentication from Database.
  • Service for Product Listing and searching from Database.
  • Service for Payments, delivery address, email etc.
  • So, who does all the work are nothing but Web APIs. Now look into below image is updated to point the APIs:
    DotNet Palace: Microservices VS API

    So, we can summarize the differences between WEB APIs and Microservices as:

  • Web API is a part of Microservice.
  • Microservices can have one or more Web APIs.
  • ❮ Monolithic vs Microservices
    Use of Microservices ❯

    Other Articles
    Introduction of Microservices.
    Monolithic vs Microservices Architecture?
    What is the difference between APIs and microservices?
    What is Monolithic Architecture?
    In which cases microservice architecture best suited?
    What are the characteristics of Microservices?
    About us

    DotNet Palace is a community platform created and maintained by The articles are mainly focused on Microsoft stack technologies like C#, ASP.Net, MVC, .Net Core, SQL Server and Oracle, PostgreSQL, SQLite etc. To improve the site's content you can send your valuable suggestions at info.dotnetpalace@gmail.com

    Quick links
  • SOLID Principles
  • Questions
  • OOPS Principles
  • DotNet Palace Tutorials
  • Privacy Policy
  • Terms and Condition