Apache APISIX etcd mysql

Apache APISIX without etcd

etcd is an excellent key-value distributed database used internally by Kubernetes and managed by the CNCF. It’s a great option, and that’s the reason why Apache APISIX uses it too. Yet, it’s not devoid of issues. First, some mention scalability, but one can expect this from a distributed data store that values consistency. Another issue may be the need for more familiarity with etcd. It’s relatively new, so your Ops team may need help operating it correctly while having

API design pattern

Designing APIs with Swagger and OpenAPI

I’m continuing my API journey by reading books, viewing relevant YouTube videos, and reading relevant IETF RFCs. Today is a book review. Facts 21 chapters$38.39 (eBook) Chapters Part 1: Describing APIsIntroducing APIs and OpenAPIGetting set up to make API requestsOur first taste of OpenAPI definitionsUsing Swagger Editor to write OpenAPI definitionsDescribing API responsesCreating resourcesAdding authentication and authorizationPreparing and hosting API documentationPart 2: Design

reactive programming database

Reactive database access on the JVM

A couple of years ago, Reactive Programming was all the rage, but it had one big issue: reactive stopped as soon as you accessed a SQL database. You had a nice reactive chain up to the database, defeating the whole purpose. Given the prevalence of SQL databases in existing and new apps, one couldn’t enjoy the full benefits of Reactive Programming but still pay the full price of complexity. Since then, the landscape has changed tremendously. Most importantly, it offers many reactive driver

sticky session session affinity Apache APISIX Hazelcast Spring Session Spring Security

Sticky sessions with Apache APISIX - the demo

Last week, we described the concept behind sticky sessions: you forward a request to the same upstream because there’s context data associated with the session on that node. However, if necessary, you should replicate the data to other upstreams because this one might go down. In this post, we are going to illustrate it with a demo. The overall design Design options are limitless. I’ll keep myself to a familiar stack, the JVM. Also, as mentioned in the previous post, one should on

sticky session session affinity Apache APISIX

Sticky sessions with Apache APISIX - Theory

Sticky sessions, also known as session affinity, is a mechanism by which a routing component that acts as a facade always routes a request to the same underlying upstream node. In this post, I’ll describe the reason behind sticky sessions, available alternatives, and how to implement them via Apache APISIX. Why sticky sessions? Sticky sessions became popular when we stored the state on the upstream node, not the database. I’ll use the example of a simplified e-commerce shop to exp

Apache APISIX Spring Spring Cloud Gateway

Evaluating Apache APISIX vs. Spring Cloud Gateway

Given the number of API Gateways available on the market, I’m regularly asked which is better. Better is a very subjective term. However, there’s no denying that if you’re advocating for a product, you should know your product and its competitors. In this post, I’d like to share my understanding of Spring Cloud Gateway and how it compares to Apache APISIX. I’m cautious when comparing products because most comparisons I read are heavily biased. That’s a risk,

Docker WebAssembly WASM WASI

Playing with WASM on Docker

The idea of bytecode that can run anywhere dates back to the JVM inception (as far as I know). WebAssembly is the new implementation of an old idea. While WebAssembly is meant to run in the browser, Docker recently announced its capability to run WASM code without needing containers. In this post, I want to explore how it can work. Prerequisite Running WebAssembly is a beta feature and requires using containerd. To enable containerd, go to the Docker Desktop dashboard, then Settings  Fea

GitLab GitLab pages

GitLab Pages preview

When I write Apache APISIX-related blog posts, I want my colleagues to review them first. However, it’s my blog, and since I mix personal and business posts, I want to keep them from the repository. I need a preview, accessible only to a few, something like Vercel’s preview. I’m using GitLab Pages, and there’s no such out-of-the-box feature. I tried two methods: GitHub gists and PDFs. Both have issues. Gists don’t display as nicely as the final page. I tried to i

health check HTTP API

Health Check Response Format for HTTP APIs

I’m continuing my journey on getting more familiar with HTTP APIs by reading related RFCs. This time, I read the Health Check Response Format for HTTP APIs on the suggestion of Stefano Fago. In this post, I’d like to summarize my reading. Note that it’s a draft. Moreover, it has been dormant for nearly two years and, thus, has been automatically expired. However, it’s the closest to a specification on health checks and thus deserves some love. Sample data visualization