Differences Between Microservices, SOA & API

Instructor: Lyna Griffin

Lyna has tutored undergraduate Information Management Systems and Database Development. She has a Bachelor's degree in Electrical Engineering and a Masters degree in Information Technology.

In this lesson we will examine the definitions of Microservices, Service Oriented Architecture and Application programming Interface. Using a relatable illustration we will understand their different roles. We will also discuss their characteristic differences.



Microservice is a method of designing software applications in which the application components are divided into small independent services called Microservices. In other words the application is designed as a collection of small services. Figure 1 below shows the application architecture comprising different services.

Figure 1.


Service Oriented Architecture (SOA)

Service Oriented Architecture uses a protocol to make public, platform independent services available to any application or user. SOAs offer services to other applications. Their functions may involve simple data passing routines or connect to another service or carry out some small functions. Figure 2 shows an SOA that may be implemented in different applications or services.

Figure 2

Service Oriented Architecture

Application Programming Interface (API)

Application Programming Interface is a set of routines and protocols that allows software components to communicate with each other. APIs are used by developers to build software applications. There are different kinds of APIs for web based, operating system and other applications. For example MS Windows provides Windows APIs that allow copy and paste activity from one application to another. Figure 3 below shows two different applications communicating through an API.

Figure 3


Microservices, SOAs and APIs Illustrated: The Nightclub Application

These definitions make room for a broad spectrum of interpretations. We are going to use an illustration to make the definitions more relatable. Let us imagine we have a night club, but not any night club… an automated one.

The night club we can viewed as an application. Being automated, it consists of the following services: a client entrance service, a bar service, food vending machine service, music service, lighting service and seating service. Because the nightclub application has been developed to comprise of different services. These services are described as Microservices. Now, some of the services use other third-party services to complete their tasks. For a client to gain entrance he has to swipe his ID card through the client entrance service machine which ensures that the age of client ID holder is 18+ years and qualifies to enter the night club (obviously the night club can't have the database of everyone in the country but the government does). It solicits a government service called Births and Deaths as we saw in Figure 2. This service provided by the government database to help with this verification constitutes an SOA architecture. For the night club application to communicate and retrieve data from the government service it does so through an API as in Figure 3.

Let us look at their differences:


APIs serves as interfaces, enabling two applications to communicate. Microservices are multiple services which constitute an applications and SOAs, they are another form of architectural approach that serve to expose the functionality of an application through an independent service. These services are designed for re-use in various types of applications.


APIs is typically associated with REST (Representational State Transfer) technology, which does not use much bandwidth. API uses REST technologies to process HTTP requests to POST, DELETE and GET data. In the case of the Microservices, the independent components communicate using the HTTP/REST with JSON which is a lightweight syntax for storing and exchanging data. SOAs is platform independent and are published in public libraries making them accessible to which ever application or client.


APIs, SOAs and Microservices all require some level of management. They have to be secured, monitored and audited irrespective of their corresponding messaging protocols. They are normally managed under standard security policies deployed through the environment. Overall the APIs are more open and more easily usable than the SOAs, but they are often referred to as subsets of SOAs.

To unlock this lesson you must be a Study.com Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use Study.com

Become a Study.com member and start learning now.
Become a Member  Back
What teachers are saying about Study.com
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? Study.com has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account