The best API gateway for microservices

Microservices and Tyk – the ideal pairing

Ultra-flexible solutions with a microservices-first approach

An API gateway for microservices delivers multiple benefits when you choose this architecture pattern. Whether you’re migrating to a microservice architecture or building from scratch with microservices, Tyk is the natural choice.

We are built from the ground up to facilitate microservices-focused architectures including features such as service discovery, load balancing, circuit breakers and enforced timeouts.

Super flexible and cloud native, Tyk enables you to scale up and down as much and as fast as you need. There’s no need for huge training programme rollouts, or doing things a fixed ‘Tyk way’ – we fit to your way of doing things and integrate naturally.

We use microservices ourselves – we walk the walk.

Tyk takes a microservices-first approach, so we know what we’re talking about.

All our components can easily scale horizontally. You can use small servers to provide high availability, then simply add more instances, depending on your traffic needs. Scaling down is also simplicity itself.

From cloud-native environments to on-premise solutions and everything in between, Tyk is here to help.

Chợ Tốt are moving to a full microservice architecture, supported by service discovery and continuous deployment. Tyk is central to this, reliably serving 10 million API requests per day, with response times of less than 30ms, whilst enabling experimental product innovation to be quickly deployed and tested.

The only API management platform, built from the ground-up for microservices

No monoliths or legacy proxies

Tyk isn’t dependent on Nginx or other legacy proxies or third-party proxies, as it was built from the ground up to enable enterprise scale microservice programmes.

Service discovery 

Etcd, Zookeeper, Consul, Linkerd, Mesosphere, Eureka… we have you covered to ensure your API programme can benefit from service discovery. All accessible through configuration, automation or our powerful dashboard GUI.

Load balancing

With native support for load balancing your API, out of the box in our gateway, you can get started straight away, with all the essentials, including weighting your requests. You can also load balance gRPC traffic

Circuit Breakers

Out of the box, Tyk provides the circuit breaker pattern for your microservices, which you can configure through the GUI or via REST API and hook into our events handler to take action when a circuit breaker trips

Enforced timeouts

Enforce an SLA by configuring your API timeouts via the Tyk Dashboard or an API definition. Total flexibility and control.

Uptime tests and liveness checks

Tyk uptime awareness is designed to supplement standard uptime monitoring tools, by offering a way to bypass unhealthy nodes when they are down, as part of Tyk’s role as an API gateway. You configure the API uptime tests per API, with Tyk REST APIs or the GUI of Tyk Manager (for paying clients). Once configured, hook into our events system to take action and integrate with the load balancing and service discovery.

Make things better today

There are multiple benefits to bringing together microservices and APIs, including:

Having a single, unified entry point for your microservices. This means that external consumers can use a single interface definition to access your microservices, while you have the freedom to build, implement and change things behind the scenes. You can enjoy the flexibility of using whatever mixture of languages and communications protocols suits you best for each of your microservices, while nothing changes from the client’s perspective.

Controlling traffic to prevent overloading. Whether you’re facing a Distributed Denial of Service (DDoS) attack or simply a major surge in valid traffic, throttling, rate limiting and API gateway routing can all help avoid your services becoming overloaded. Using an API gateway in microservices environments also means you can take a more strategic approach to routing.

Delivering robust security. With the API gateway structure in place for your microservices, you can implement solid security at the gateway layer, rather than having to do it for each individual microservice. This is a far more efficient approach and supports standardisation across your APIs and microservices.

Efficient load balancing. API gateway features empower you to use your resources strategically, in a way that delivers greater resiliency and routes traffic effectively. From handling retries and timeouts to enhancing discoverability, an API gateway can serve as the key to unlocking the power of your microservice API architecture.

Robust protection of internal concerns. The API gateway sits between your client applications and your microservices, which prevents the exposure of your internal concerns to external clients.

Scope for mocking and virtualisation. With microservices APIs separated from your external API, you can mock and virtualise services to your heart’s content. You can achieve it using the Tyk classic API definition, as well as a standard OpenAPI Spec that is imported to Tyk. This is ideal for validating design requirements and for integration testing. Time to start innovating.

Are you ready to embrace all that microservices and APIs have to offer? Then it’s time to talk to Tyk.

Contact Tyk now

Microservices and Tyk

What can you expect when using the Tyk API Gateway with microservices? How about these for starters:

Flexibility – Tyk Gateway is vendor agnostic, affording you the flexibility to make changes to your architecture at short notice, should you need to.

Rate limiting and throttling – Tyk delivers the flexibility to handle traffic however you need.

Security – you can deliver microservices authentication and authorization using Tyk API Gateway, thanks to our robust security.

Superb user experience – your gateway will serve as a single, unified entry point for your API and microservices architecture, so we’ve designed it to be easy to implement and configure. We’re also here to help in those moments when you need a helping hand, a friendly face or just some to talk things through with.

Performance – the Tyk API Gateway adds a layer of abstraction between your external customers and your microservices endpoints. It supports you to achieve your goals without negatively impacting performance as a result of that abstracted layer.

Caching – Tyk API Gateway handles caching, meaning that your microservices aren’t dealing with frequent requests. This can improve the performance of your API and microservices.

Monitoring and analytics – Tyk Gateway can deliver insights into your API microservices architecture, putting the power to make better business decisions in your hands and ensuring you get the best from your microservice API design.

Deployment flexibility – Tyk provides flexible deployment options (cloud, self-managed or hybrid), so you can ensure the gateway meets your needs.

Easy implementation and integration – introducing a microservices API gateway into your architecture obviously comes with a learning curve. Choosing Tyk API Gateway means opting for a gateway that is easy to implement and fast to integrate, as well as one that comes with outstanding support to minimise the time and cost implications of that learning curve.

Tyk and Kubernetes

Kubernetes – a container orchestration system – is a popular choice for automating the management, scaling and deployment of microservice applications. It allows you to manage hundreds or thousands of containers at production scale.

Tyk works well with Kubernetes in terms of installation, API management and publishing APIs. You can install it in your cluster using Tyk Helm charts. Then, as the preferred way to manage your API lifecycle while following GitOps standards, Tyk offers a Kuberenetes operator (for Tyk API definitions, security policies and other features). Tyk Operator also provides an Ingress Controller, which dynamically manages Tyk API definition resources as per the ingress spec. This way, your Tyk Gateway is configured as a drop-in replacement for a standard Kubernetes Ingress.

Find out more

FAQ

  • What is an API gateway in microservices?

    The API gateway pattern in microservices is a way to enjoy all the benefits that the granularity of microservices deliver, while taking a robust, unified approach that delivers powerful security, enhanced control, superior flexibility and a consistent user experience for your external customers.

    In a microservices architecture pattern, the API gateway sits between your client applications and your microservices. All traffic routes through the gateway, which provides a single entry point. The gateway accepts API calls from client applications and routes them to the appropriate microservice endpoint, decomposing a single request into multiple requests if required and then aggregating the results before delivering the response back to the client.

    This microservices API example sees the gateway deliver a range of features and services, including rate limiting, access quota management, security, caching, routing, API health analytics and API composition, processing and versioning. With an API management layer, such as Tyk, additional benefits can include full lifecycle API management, in-depth analytics and opportunities for monetisation.

    Discover the API gateway pattern in microservices in further detail.


  • How to choose the best API gateway

    When choosing the best API gateway – and particularly the best microservices gateway – it’s important to consider both your current requirements and the need to respond flexibly to future changes (both foreseen and unforeseen) and evolving technology (adding GraphQL into the mix with API microservices, for example). Some of the key points to consider include:

    • Flexibility
    • Performance
    • Security
    • Superb user experience
    • Rate limiting and throttling
    • Caching
    • Monitoring and analytics
    • Deployment flexibility
    • Easy implementation

  • What is the difference between API and microservices?

    An API (an application programming interface) is a way for two pieces of software to communicate with each other. Microservices, meanwhile, are independent services that each perform a particular function. One commonly cited example of microservices delivering huge success is Netflix. Amazon, Etsy and Uber have also depended on a microservices implementation to underpin their ability to scale flexibly.

    A microservices API gateway brings all of this together and, in so doing, delivers multiple benefits, from security to control to transformation.


  • How an API gateway works in microservices

    In a microservices architecture pattern, an API gateway sits at the edge of the microservices. From there, it manages the flow of API calls between client applications and your microservices, along with the responses back to the clients. It is a slick, efficient alternative to the direct client-to-microservices pattern, which – should you scale rapidly – can quickly descend into something of a mess.


Ensure your Tyk deployment is healthy, with flexible and configurable Tyk liveness checks, right out of the box.