简体   繁体   中英

Improve Grails App in Heroku compression, gzip, expire tags

I'm trying to improve the speed performance of my page, I have a couple questions

I'm using Grails 3 on heroku.

Is there any way to make a HTML compression(gzip) the gsp pages? Can I add Image Expires Tag on the header?

for last, Can we use a .htaccess file on a grails app?

thanks in advance

Use Apache for compression and expires. Don't create a .htaccess file, but create a virtualhost with a proxy to your Grails application.

Between Apache and Grails you can also add a HTTP cache server, for example Varnish . If what you are serving is mostly static, then configuration will be quite easy and you would see a dramatic speedup(1000x). If you have a lot of dynamic content and sessions, configuring a cache server can become quite complex.

We run our company website with Apache + Varnish + Grails + PostgreSQL all alone on a EC2 t2.micro instance and its blazing fast!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM