Support » Plugin: Amazon AWS CDN » Worked like a charm

  • Dear friend,
    Thanks a lot for the plugin, saved us a ton of time and effort.

    One small clarification needed, would be great if you could help.

    Once the cdn was setup and worked we left it alone till now when we realised that the data was being pumped by the website on inspection we realised that the plugin was missing as we had created an instance from a pre plugin ami. We installed it again and did another setup to make it work. We checked and found taht the erlier distribution was present and enabled but probably not serving.

    So my question is…does the plugin has any depedency on the distribution and vice verca?

    • This topic was modified 7 months, 1 week ago by vivekdojoko.
Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author luckychingi

    (@luckychingi)

    Thanks @vivekdojoko

    The plugin stores the AWS distribution domain address on the web server and will only use the distribution if enabled on the plugin admin page.

    Thread Starter vivekdojoko

    (@vivekdojoko)

    Thanks for the reply. A few questions to help us understand it better.

    1. So that means we need to necessarily have the plugin install and enabled at all time

    2. In a multiserver setup, does that mean we need to have the plugin installed on all servers?

    3. We tried setting up the cdn manually (created distribution, behaviour everything) but the traffic was not getting diverted to the cdn. We are not making any change to the route53 or to wordpress

    I know this is outside of scope of the plugin but would help us understand what is missing when creating thru manually.

    Plugin Author luckychingi

    (@luckychingi)

    1. So that means we need to necessarily have the plugin install and enabled at all time

    yes, that is correct.

    2. In a multiserver setup, does that mean we need to have the plugin installed on all servers?

    I havent tested but would guess that to be the case

    3. We tried setting up the cdn manually (created distribution, behaviour everything) but the traffic was not getting diverted to the cdn. We are not making any change to the route53 or to wordpress

    If you have setup the CDN manually, you can provide the same access Id and key used to setup the CDN and click list distribution. The plugin will pickup the details and store it on the the server for use

    Thread Starter vivekdojoko

    (@vivekdojoko)

    Just an update

    We tried and it is indeed required to be enabled on all servers, we had to do some juggalary to make it work.

    It is a hassle though as our cicd pipeline overwrites it every time a new build is deployed on prod.

    Is there a way to avoid it?

    I believe it changes the references in the code also. Any help would be appreciated.

    Thread Starter vivekdojoko

    (@vivekdojoko)

    Dear @luckychingi

    Pls help

    If there is a script which can. E run to re-set the cdn after deployment, we would be grateful

    Vivek

    Plugin Author luckychingi

    (@luckychingi)

    Hello @vivekdojoko

    I’ll have to understand the process to recommend a process.

    I am assuming the database is overwritten during deployment. Let me know if that is the case

    Thread Starter vivekdojoko

    (@vivekdojoko)

    No @luckychingi , database is not touched at all during the deployment

    We only take the latest code from git. Wp_config etc. are not touched

    We use aws code deploy for this and follow blue/ green methodology
    Hope this gives the basic flow.

    Appreciate all your help. Hopefully we will find a solution.

    Plugin Author luckychingi

    (@luckychingi)

    Does the deployment delete the existing files?

    Thread Starter vivekdojoko

    (@vivekdojoko)

    Yes, we do have a git pull everytime and then use ansible to push the configuration files based on the environment

    so if there is a script/file which is generated by hte plugin we can execute it.

    this would be a great for large multi server setups, currently we have 3 servers but planning to add more as the operations scale up

    Plugin Author luckychingi

    (@luckychingi)

    Thanks,
    Will tweak the plugin to store the info in the DB rather than the a txt file.

    Thread Starter vivekdojoko

    (@vivekdojoko)

    that would be nice.
    however in the meanwhile if you could kindly let us know hte text file generated, we will ensure that file is there even after a new release.

    Vivek

    Plugin Author luckychingi

    (@luckychingi)

    It is stored in the uploads folder.

    Plugin Author luckychingi

    (@luckychingi)

    @vivekdojoko Ver 2.0.0 saves the details in the database. I hope this help

    Thread Starter vivekdojoko

    (@vivekdojoko)

    @luckychingi yes that certainly helped, we are currently testing on a beta site. will let you know if we face any issues.

    We are facing some problem using the plugin itself, which is something new as we never had this issue earlier.

    the problem being, after activating the plugin and CDN (created earlier), when we try to access the url we get the following url cdn_distribution.cloudfront.net in the address bar rather than dojoko.xyz

    we tried excluding some pages to see if that works, and now the pages started working with right url but the resources like css / js / images also got skipped, means they were also also having dojoko.xyz as the domain and not distribution.cloudfront.net. we also tried giving js, css jpeg png etc in wildcard but we could not make it work.

    can you please guide us? our beta website is http://dojoko.xyz
    We are certain we are missing something, as it was perfectly fine in earlier version.

    Plugin Author luckychingi

    (@luckychingi)

    @vivekdojoko
    Can you send an email from my website?

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Worked like a charm’ is closed to new replies.