Another small step. But it made a significant difference. As a developer, I'm always looking at performance and responsiveness of pages. A throwback to my developer days when 11kbps was the pipe size through modem. I kind of pride myself for thinking and designing fast and responsive (not to be confused with css responsive) web pages.
As the number of transactions grow, the page performance degrades. Today, I have 2000+ transactions over the last 2.5 years. To load them all at once is becoming time consuming (50 sec from my home connection) so here is what I did.
- Tweaked DB Index. As the data size is still small there wan't much I got out of it
I then turned my attention to gzip. The compression commonly used across to minimize the payload.
I was looking to apply it on tomcat when I figured out that AWS by default provides Apache as part of Beanstalk. I didn't know that(Ignorance?). It then made sense to apply these to Apache to cover the static data too( I'm now thinking of moving css / .js to Apache directly).
I researched and found out how to do within AWS by creating .ebextension folder and config file in the ROOT directory and package them in the .war file. But then it did not work for me. The deployment failed. I then dived into the unix world Telnet into EC2, check out the root. Change to super. Make directory etc.Change permissions etc. The command in myapp.config was to copy the Apache config file over to apache server directory and then restart Apache.
So finally it turned out, all that was required was to put a config file in Apache dir to enable compression and then restart Apache.
Did that and bingo!!!
The page that was taking 50 secs came down to 7 secs. Slept well!
As the number of transactions grow, the page performance degrades. Today, I have 2000+ transactions over the last 2.5 years. To load them all at once is becoming time consuming (50 sec from my home connection) so here is what I did.
- Tweaked DB Index. As the data size is still small there wan't much I got out of it
I then turned my attention to gzip. The compression commonly used across to minimize the payload.
I was looking to apply it on tomcat when I figured out that AWS by default provides Apache as part of Beanstalk. I didn't know that(Ignorance?). It then made sense to apply these to Apache to cover the static data too( I'm now thinking of moving css / .js to Apache directly).
I researched and found out how to do within AWS by creating .ebextension folder and config file in the ROOT directory and package them in the .war file. But then it did not work for me. The deployment failed. I then dived into the unix world Telnet into EC2, check out the root. Change to super. Make directory etc.Change permissions etc. The command in myapp.config was to copy the Apache config file over to apache server directory and then restart Apache.
So finally it turned out, all that was required was to put a config file in Apache dir to enable compression and then restart Apache.
Did that and bingo!!!
The page that was taking 50 secs came down to 7 secs. Slept well!
No comments:
Post a Comment