Error 429 - Fail story

Fail Story

AWS AppSync

Introduction: What is AWS?

AWS means Amazon Web Services. AWS is a web-based service that helps users store, process and transmit various types of data over the internet. It is the current global market leader in cloud infrastructure and platform services (read our article about our support for this service here…).

This service now has over than 200 functionalities and is used by millions of people around the world. It is known for “reducing costs, becoming more agile and innovating faster”.

The project

At the beginning of 2018, when a client gives us the mandate to make a new version of their application. At that time, we are in the midst of cloud euphoria because it was “only in 2017” that AWS was deployed in France (and is coming soon to Switzerland according to AWS).

One technology presented by AWS was of great interest for us, it is known as AWS AppSync. We intended to use this solution to simplify the creation of the website via a GraphQL.

To do this, we had to develop a connector via AWS Lambda in Python that reacts to GraphQL events (resolver).

Technologies used

The problem

The failure part of the project is the implementation of AppSync (fork of Apollo GraphQL) in the Android application. This tool was supposed to have a powerful cache, the best connection/disconnection management and a high reactivity in communication.

The subsequent testing stage was a high-impact part for 2CS :

 

-> The cache was performing well but it was also invalid when the 2 hours were over
-> The management of reconnections was inoperable
-> Priority management was untreatable once the disconnection / reconnection was successful
-> We can upload and download at only 20kb/s

The wall

We had to find a solution as soon as possible :

→ Creation of a SQLite database parallel to the GraphQL cache to counteract the 2 hour timeout

→ Overloading (overide) some communication classes to fix AWS errors with the Queue Manager and Connection Manager

→ We did not find any solution regarding bandwidth limitation.

→ Enormous number of tickets to AWS Support (acknowledging ‘minor defects’).

→ Development of a FIFO (First In, First Out) layer as a fix to the unusable Queue Manager.

Despite our efforts, we found ourselves with our backs to the wall, so to speak, and were forced to start from the beginning, taking into account what had been done before.