Making your APIs highly available (2024)

Creating reusable APIs require planning and consideration with the customer in mind. Great APIs start with “treating your APIs as products”. This means you start creating APIs with the “end” in mind. In Apigee, proxies allow you to expose your business logic to consumers that you trust. They serve as entry points to application logic and data that sit between your customer and your backend. Proxies also allow you to do things like attach policies. Proxies are made up of 2 different endpoint types:

Proxy endpoint — Defines how customers will access your APIs.

Target endpoints — Defines how customers will interact with your backend applications by decoupling hard coded endpoint URLs from TargetEndpoint configurations.

Making your APIs highly available (2)

One of the ways you can deliver a great experience to your customer is by making your API highly available. There may be times where you have separate load balancers pointing to your backend server in order to provide high availability. You can leverage these load balancers to make your backend highly available by using the target endpoint to configure load balancing.

In order to set up load balancing within your proxy, you have to first create a target server. Target servers allows you to give each of your backend servers a unique name that is coupled to a host or a server. This unique name can be used to configure “targets” in your target endpoint configuration. In order to create a target server you can log into the Apigee console go to Management > Environments:

Making your APIs highly available (3)

Target servers live in environments. In order for your target servers to be available for your proxy they have to be created in the environment that your proxy is deployed to.

Next click on Target Servers > Create target server:

Making your APIs highly available (4)

After putting in all of your server information click on create.

Making your APIs highly available (5)

After creating your target servers, Next edit your target endpoint configuration by going to proxy > Develop > target endpoint.

Making your APIs highly available (6)

When you configure a load balancer in your proxy by default Apigee will use the round robin algorithm to distribute your traffic which will send traffic to each server in the order listed. You can also choose between:

  • Weighted: Allows you to define what percentage of traffic goes to what server.
Making your APIs highly available (7)
  • Least connection: Sends requests to the TargetServer with fewest open HTTP connections.
Making your APIs highly available (8)

These algorithms can be declared using the <algorithm> element.

Making your APIs highly available (9)

In addition to using algorithms you can also configure routing logic based on failures with tools like MaximumFailures, Retry, and Isfallback options within health checks.

Health checks at the proxy level in Apigee allow you to test connectivity to your target servers (backend). By enabling health monitoring you can set up checks to poll the backend service URLs that you specified in your TargetServer configuration. Health checks add a level of fault tolerance to your APIs and allow you to mask failures. Fault tolerance is achieved by monitoring health check requests for failures. After a specified number of failures the load balancer will take the problem target server out of load balancing rotation. Failures are masked because your API is still available by your load balancer sending traffic to your health target servers. Your API consumer is still able to access your APIs without interruption.

When you enable health monitoring there are 2 types of monitor you can specify:

TCPMonitor: TCPMonitors listen on port 80 which by default polls your target servers every 5 seconds.

HTTPMonitor: HTTPMonitor sends a GET request to your target service. You should use HTTPMonitor health checks when your backend is configured to use HTTP and one-way HTTPS protocols.

Handling Failures

Designing highly available APIs require you to consider how failures should be handled. MaximumFailures in Apigee allow you to specify a set number of unsuccessful connections. Once that number of failures have been reached the load balancer will take that specific target server out of rotation. When MaximumFailures attribute is set to 0, the load balancer won’t take the target server out of rotation. It’s important to specify a number of at least 1 in order to take advantage of fault tolerance to reduce interruptions that your consumer may experience. You can specify the maximum number of failures by using the Max Failures element.

Making your APIs highly available (10)

You can also leverage the Retry option to have the health check try to establish connectivity after a failure.

Making your APIs highly available (11)

Using the IsFallback option allows you to set a designated server as the “fall back server” meaning that if all other target servers become unavailable or unhealthy traffic will then be routed to the specified fall back server. You can specify a fallback server by using the Isfallback element.

Making your APIs highly available (12)

Configuring target servers in your target endpoint configuration allows you to create great digital experiences for your customers by making your API highly available. APIs that are reliable and easy to use will help increase adoption across your organization and customer base. Want to know more about target servers and the additional features that you can configure to make them more robust checkout this Apigee training.

Making your APIs highly available (2024)

FAQs

Making your APIs highly available? ›

Adopting a microservices architecture can greatly improve the scalability of your API. By breaking your application into smaller, independent services, each responsible for a specific functionality, you can manage and scale these components individually.

How do I make my APIs more scalable? ›

Adopting a microservices architecture can greatly improve the scalability of your API. By breaking your application into smaller, independent services, each responsible for a specific functionality, you can manage and scale these components individually.

Is API gateway high availability? ›

API Gateway provides an active/active high availability solution for the Admin Node Manager that supports multiple DMZ deployment patterns.

When creating an API, why is it important to consider hosting? ›

The provider then takes care of hosting and managing the API. This includes scaling, monitoring, security, and maintenance. This allows you, as a developer, to focus on developing the functionality of your API. One of the main advantages of API-as-a-service is its simplicity and ease of use.

How do I optimize my API performance? ›

Strategies to Boost Your API Performance
  1. 1 Caching. Caching can improve API performance by storing the results of expensive or frequently accessed operations in a temporary storage area. ...
  2. 2 Connection Pooling. ...
  3. 3 Avoiding M+1 Query Problems. ...
  4. 4 Pagination. ...
  5. 5 Use Lightweight JSON Serializers. ...
  6. 6 Compression. ...
  7. 7 Asynchronous Logging.
Apr 5, 2024

How do I create a high performance API? ›

Step up the API performance
  1. Design and Architecture: Using lightweight data formats like JSON or protocol buffers for faster serialization. ...
  2. Database Optimization: ...
  3. Infrastructure: ...
  4. Code Optimization: ...
  5. API Design, Security and Compliance: ...
  6. Monitoring and Testing: ...
  7. Client-side Optimization.
Feb 14, 2024

What are high level APIs? ›

High-level APIs are fairly abstracted, meaning they are more generic and, therefore limited in functionality. Low-level APIs are much more detailed and specific due to a low level of abstraction. Low-level APIs allow for finer control over application functions.

Why not use API gateway? ›

Downsides of API gateways

It's important to consider these possible API gateway drawbacks: Increased overhead. API gateways add another layer to an application hosting stack, increasing the amount of infrastructure resources required to run apps. Increased complexity.

What is the most used API gateway? ›

The Top 8 API Gateways Include:
  1. Amazon API Gateway.
  2. Azure API Management.
  3. Boomi API Management.
  4. Google API Gateway.
  5. IBM API Connect.
  6. Kong Gateway.
  7. MuleSoft Anypoint Flex Gateway.
  8. WSO2 API Manager.
Jul 8, 2024

What is API-first strategy? ›

API-first, also called the API-first approach, prioritizes APIs at the beginning of the software development process, positioning APIs as the building blocks of software. API-first organizations develop APIs before writing other code, instead of treating them as afterthoughts.

What is the most important in API? ›

The Importance of APIs

With a focus on modern B2B usage, an application programming interface can be a critical component to integrating data flows with customers and partner systems. It can even add increased flexibility to traditional types of robust exchange such as managed file transfer (MFT) and EDI.

Does an API need a server? ›

A Web API or Web Service API is an application processing interface between a web server and web browser. All web services are APIs but not all APIs are web services. REST API is a special type of Web API that uses the standard architectural style explained above.

How do you increase scalability? ›

Strategies like indexing, denormalization, database caching, and query optimisation can facilitate the effective distribution of high-volume data across multiple database instances and avoid unnecessary subqueries, helping you achieve higher scalability and resilience.

What does it mean for an API to be scalable? ›

Scalability is the ability of a system to handle an increasing amount of load while still delivering fast response times. In our definition, a web API delivers a fast response time if it responds in 50 milliseconds or less.

How can I make my API better? ›

7 REST API Best Practices for Designing Robust APIs
  1. Utilize the Recommended Endpoint Naming Conventions.
  2. Use the Appropriate HTTP Method.
  3. Manage REST API Requests and Responses Effectively.
  4. Use the Appropriate Request Headers for Authentication.
  5. Know When to use Parameters vs.
Dec 5, 2023

Top Articles
If You'd Invested $500 in Ethereum in 2015, Here's How Rich You'd Be Now | The Motley Fool
How do I find and fix bank reconciliation errors?
Kevin Cox Picks
122242843 Routing Number BANK OF THE WEST CA - Wise
Jeremy Corbell Twitter
Craigslist Furniture Bedroom Set
Www Craigslist Louisville
Achivr Visb Verizon
Hover Racer Drive Watchdocumentaries
Midlife Crisis F95Zone
10-Day Weather Forecast for Florence, AL - The Weather Channel | weather.com
[Birthday Column] Celebrating Sarada's Birthday on 3/31! Looking Back on the Successor to the Uchiha Legacy Who Dreams of Becoming Hokage! | NARUTO OFFICIAL SITE (NARUTO & BORUTO)
Les Rainwater Auto Sales
Destiny 2 Salvage Activity (How to Complete, Rewards & Mission)
Committees Of Correspondence | Encyclopedia.com
Salem Oregon Costco Gas Prices
Invert Clipping Mask Illustrator
Honda cb750 cbx z1 Kawasaki kz900 h2 kz 900 Harley Davidson BMW Indian - wanted - by dealer - sale - craigslist
3S Bivy Cover 2D Gen
Craigslist Sparta Nj
Ivegore Machete Mutolation
All Obituaries | Gateway-Forest Lawn Funeral Home | Lake City FL funeral home and cremation Lake City FL funeral home and cremation
8005607994
Low Tide In Twilight Ch 52
Essence Healthcare Otc 2023 Catalog
Apparent assassination attempt | Suspect never had Trump in sight, did not get off shot: Officials
Marquette Gas Prices
Telegram Voyeur
Ascensionpress Com Login
Roseann Marie Messina · 15800 Detroit Ave, Suite D, Lakewood, OH 44107-3748 · Lay Midwife
Landing Page Winn Dixie
Nacogdoches, Texas: Step Back in Time in Texas' Oldest Town
Max 80 Orl
A Small Traveling Suitcase Figgerits
De beste uitvaartdiensten die goede rituele diensten aanbieden voor de laatste rituelen
Lichen - 1.17.0 - Gemsbok! Antler Windchimes! Shoji Screens!
Pill 44615 Orange
Spinning Gold Showtimes Near Emagine Birch Run
Sams La Habra Gas Price
Michael Jordan: A timeline of the NBA legend
Does Target Have Slime Lickers
Noh Buddy
M&T Bank
Sea Guini Dress Code
Dancing Bear - House Party! ID ? Brunette in hardcore action
18 Seriously Good Camping Meals (healthy, easy, minimal prep! )
Quest Diagnostics Mt Morris Appointment
Pelican Denville Nj
Deshuesadero El Pulpo
Wwba Baseball
Optimal Perks Rs3
Dinargurus
Latest Posts
Article information

Author: Cheryll Lueilwitz

Last Updated:

Views: 5917

Rating: 4.3 / 5 (54 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Cheryll Lueilwitz

Birthday: 1997-12-23

Address: 4653 O'Kon Hill, Lake Juanstad, AR 65469

Phone: +494124489301

Job: Marketing Representative

Hobby: Reading, Ice skating, Foraging, BASE jumping, Hiking, Skateboarding, Kayaking

Introduction: My name is Cheryll Lueilwitz, I am a sparkling, clean, super, lucky, joyous, outstanding, lucky person who loves writing and wants to share my knowledge and understanding with you.