source: https://unsplash.com/photos/sGwoXcxKbcE

Recently, We have done a PostgreSQL version upgrade and faced few performance issues afterward. I thought to share it in this short blog post so that It can help others plan better.

We are using the RDS service from AWS to manage our production database. So all we had to do is modify database settings to select the newer version and apply changes.

During major version upgrades, RDS used pg_upgrade utility command from Postgres to do the upgrade. The internal format of system tables, data files, and internal data storage format also changes.

In both minor and major version upgrades…


To enable HTTPS for any website, we need to install and configure an SSL certificate on the server. SSL certificates protect users’ sensitive data such as payment-related info, name, address, email, etc by encrypting the data during transmission from their browsers to your servers. We can get paid SSL certificate from certificate providers or generate using some open-source tools like let’s encrypt or cert-bot.

For self-managed ec2 instance, we can easily configure the SSL certificate by login into the server via SSH. But If we are running a web application on Elastic beanstalk then it manages the instance. EB takes…


https://unsplash.com/photos/3ECPkzvwlBs

Recently, I configured time-based auto-scaling for one of our production applications running on an Elastic beanstalk environment. Our use case is to scale-out ec2 instances on Monday morning and scale-in every Friday night.

One such Monday morning, we got about 4xx requests more than the threshold we had set for the purpose of monitoring. This triggered an investigation to see what had gone wrong. We found out that as soon as scale-out event triggers, a new instance is created and put behind a load balancer. Elastic beanstalk performs container commands as per configuration.

In this case, it took 3–5 minutes…


Caching is a very good way to load our web pages faster on users’ browsers, But that same cache becomes a problem when you have made a new release of your web application and this new release contains few very important bugs fixes or import feature. In that case, You expect your users to start using a new version of your application and you will have to handle cache-busting during such release.

In this post, I am going to share a checklist of things that you should do to bust the cache for an angular app deployed with AWS S3…


Recently, I was working on one Django project which is already deployed on Elastic Beanstalk. Due to some new feature requirement, I had to create a python script which can connect to the same database that Django app is connecting and perform some tasks which can re-use few functions already written. I had to set up a cronjob to run this script daily exactly one time.

Elastic Beanstalk makes it easy to deploy a Django project. We can do it easily with AWS CLI or we can upload zip via the console. But, When it comes to placing a Django…


This post is intended for web developers who are trying to implement image upload functionality.

If your website needs to allow users to upload images then it is always a good idea to upload them on s3 bucket, instead of your dedicated server. Uploading on s3 will have the following benefits:

  • You can store as much data as you want and access it when you need it.
  • You don’t need to worry about backups if you have stored it on S3.
  • With Amazon S3 you only pay for the storage you actually use. …

APIs in Web and mobile applications are the rising trend today. One impact of this trend is that a huge amount of commerce today takes place through APIs. These APIs eventually add to your business value.

Well, API performance can directly affect a business, hurting brand image or cutting into revenue as customers struggle to complete their action. What if in your website, pages are taking too long to load. What if your mobile app is taking to long time to load data from server ? How will you know that your APIs are performing slower ? In worst case…

Hiren Patel

Full stack web developer (Python,Django,Angular,AWS)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store