The Coupling Point: How I saved $2K/m by Progressively Decoupling Drupal!
Updated: Jun 2, 2019
Today is an exciting day for me....after years of hard work, i have reached a milestone...
...i have finally reached "The Coupling Point" ™
The Coupling Point, is the point in your application integration, where you can merge 2 different technologies together, for the purpose of creating a better experience for your application users, and for me, most importantly, how to make your application more efficient for the purpose of cost savings on your application architecture to reduce cloud infrastructure costs dramatically!
...breaking a critical scaling barrier.
I just threw away 160 servers and could not be happier!!!...yup, you heard that right... my Patent Pending Ai NLP News Analysis Engine that powers https://buzzwords.news website and Buzzwords Alexa Skill, previously required 80 servers per calculation to complete within 1.5 hours, twice a day autoscaled, about $3K total per month!!!
Today, after Progressively Decoupling Drupal, i can run my calculation 5 times a day, with just 4 server, reducing my EC2 cost by 90% = ~$1,800 per month!
That is the true power of the cloud, to be able to spin down waste on demand...
...and i am going to tell you all about how i did what i did...
live, learn & teach.
No magic, this is the cause & effect of R&D....engineering, optimizing, reengineering, rearchitecting, testing, scaling, perseverance and breaking barriers!
In my case, Decoupling my Drupal 8 application https://buzzwords.news , will reduce my total costs by an estimated 50%!
Let's take a look at some "before & after" graphs, shall we...
COSTS BEFORE / AFTER Progressively Decoupling Drupal: v1 vs v2
In the bar chart below, you can see, on the day of the cutover, costs cut by 50%!
...there are 2 types of satisfactions in business...making money, and saving money...and the latter is almost as good as the former...
there is a cost to every scaling point.
RDS DB details:
# May full month bill to show full month before / after reduction
Net Savings thus far: -$1.4K compared to a couple months ago, still more work todo...
March was $3.2K vs May $1.8K
Now here is where we get technical...take a deep breath...
OK, now let's talk specifically about "The Coupling Point", besides just cost savings, this is what i really want to discuss herein;
Notice where the application is decoupled and how "The Top Buzzwords Today" sections, in the DOM canvas div area is lazy loaded on the fly using the relatively new Fetch AJAX call;
Experience live here: https://buzzwords.news
So how did i actually do it?
<!-- Progressively Decoupled Dashboard --><!-- Style -->
<link href="https://fe.buzzwords.news/style-min.css" rel="stylesheet" />
<!-- BZFACE Magic Div -->
<div class="main-container container" id="bzface" role="main"> </div>
<!-- Load Dark Magic -->
var app_type = "d8"; // set decoupled app type logic
// bzHome(); // init home
bzSituation(); // init Situation of The World
<!-- End -->
#TODO: write more about this...and give code example.
...in fact, if done right, you can decouple / couple any web cms to this pure js approach...
And now that i have Progressively Decoupled Buzzwords.news i am one step closer to fully Decoupling Drupal for the purpose of deploying multiple heads in a Headless Drupal Architecture.
Take a look at a preview of my fully decoupled beta Front End here, let me know what you think:
More to come soon b"h...
G-D Bless, Shabbat Shalom,
now...how bout instead of calling it Headless Drupal we call it....
wait for it...
Hydra Drupal ™
#TODO more about Headless Drupal 8 to come...
#TODO: explain the before/after diff in bzcalc, writing to 20 tables for a single bzcalc_results content type vs 1 single table of results.
...to be continued...