Below you will find pages that utilize the taxonomy term “backend”
Posts
Websockets, Dealing with realtime updates for async API
Problem Recently I came across a scenario at work where I had to deal with real time updates of payment status in mobile which involved an asynchronous chain of events in the backend. Mobile would call the backend to initiate a payment request, backend would do basic validation - initialize the payment and return a token to the UI. Actual payment involved multiple API calls to some of the internal systems as well as third party systems.
read morePosts
Database Connection Pooling
DB Connections are expensive Normally following things happen when your backend service talks to a database:
service initiates a connection to DB using the database driver
db does the authentication and establishes a network session (tcp) if succeeded
program/service performs some db operation (CRUD) which follows authorization (if user/role is allowed to perform the requested operation)
Now if the service decides to close the connection, it has to do these all over again which is quite an expensive process.
read morePosts
Debugging Slow Queries In Backend
What are the things that should be on your checklist when you are facing a situation where your db queries are taking a lot of time?
Cross check simple things such as if you would require pagination. If your filters are none (or too broad) even with optimized query plan/indexing query can take some time.
Take the slow query, view the execution plan and cross check if you would require indexing, if your query is set to run with the indices (eg: is the query properly making use of functional indices?
read morePosts
Database Connection Pooling
DB Connections are expensive Normally following things happen when your backend service talks to a database:
service initiates a connection to DB using the database driver db does the authentication and establishes a network session (tcp) if succeeded program/service performs some db operation (CRUD) which follows authorization (if user/role is allowed to perform the requested operation) Now if the service decides to close the connection, it has to do these all over again which is quite an expensive process.
read more