<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><generator uri="https://jekyllrb.com/" version="3.9.5">Jekyll</generator><link href="https://techlog.muazzam.my/feed.xml" rel="self" type="application/atom+xml" /><link href="https://techlog.muazzam.my/" rel="alternate" type="text/html" hreflang="en" /><updated>2024-06-26T22:38:16+08:00</updated><id>https://techlog.muazzam.my/feed.xml</id><title type="html">Techlog | Embracing the Spectrum of Tech, from Simple to Sophisticated</title><subtitle>Your go-to source for concise and practical tech tutorials and insights.</subtitle><author><name>Muazzam</name></author><entry><title type="html">Building a Scalable Web Application: Integrating React.js, Nginx Load Balancer, and Python Flask APIs with MongoDB</title><link href="https://techlog.muazzam.my/2024/06/26/todoapp-deploy.html" rel="alternate" type="text/html" title="Building a Scalable Web Application: Integrating React.js, Nginx Load Balancer, and Python Flask APIs with MongoDB" /><published>2024-06-26T00:00:00+08:00</published><updated>2024-06-26T00:00:00+08:00</updated><id>https://techlog.muazzam.my/2024/06/26/todoapp-deploy</id><content type="html" xml:base="https://techlog.muazzam.my/2024/06/26/todoapp-deploy.html"><![CDATA[<p>Building and deploying fullstack web application today is different, compared to during the old times. Technologies has advanced further and allow us to keep our work standardise, simple, and faster.</p>

<p>Following is the diagram of the architecture:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>                 Docker | Containerized Applications                                                                                             
                ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
                │                                                                                                                               │
                │                                                                    '/' GET                                                    │
                │                                                                                                                               │
                │                                                                    '/create' POST                                             │
                │                                                                                                                               │
                │                                                                    ┌───────────────────┐                                      │
                │                                                                    │                   │                                      │
                │                                                              ┌────►│ flask | backend-1 ├─────┐                                │
                │                                                              │     │                   │     │                                │
                │                                                              │     └───────────────────┘     │                                │
                │                                                              │                               │        ┌────────────────────┐  │
┌─────────┐     │  ┌────────────────────┐         ┌──────────────────────┐     │                               │        │                    │  │
│         │     │  │                    ├────────►│                      ├─────┘                               ├───────►│ MongoDB | database │  │
│ Visitor ├─────┼─►│ reactjs | frontend │         │ nginx | loadbalancer │                                     │        │                    │  │
│         │     │  │                    │◄────────┤                      ├─────┐                               │        └────────────────────┘  │
└─────────┘     │  └────────────────────┘         └──────────────────────┘     │     ┌───────────────────┐     │                                │
                │                                                              │     │                   │     │                                │
                │                                                              │     │ flask | backend-2 ├─────┘                                │
                │                                                              └────►│                   │                                      │
                │                                                                    └───────────────────┘                                      │
                │                                                                                                                               │
                │                                                                    '/update' PUT                                              │
                │                                                                                                                               │
                │                                                                    '/delete' DELETE                                           │
                │                                                                                                                               │
                └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
                                                                                                                                                 
                                                                                                                                                 
                                                                                                                 Made by Muazzam @ Hakase        
                                                                                                                 26/06/2024                      
                                                                                                                                                 
                                                                                                                 made possible at: asciiflow.com 
</code></pre></div></div>

<p>Based on the diagram above, there is one container for handling frontend, then forward the request to one load-balancer, and forward again the request to one of the backend, depends on the URL path. If the request are ‘/’ with GET method, and ‘/create’ with POST method, backend-1 container will process the request, while if the request are ‘/update’ with PUT method, and ‘/delete’ with DELETE method, backend-2 container will process the request.</p>

<p>to be continue…</p>]]></content><author><name>Muazzam</name></author><category term="Web Development" /><category term="React.js" /><category term="Nginx" /><category term="Load Balancing" /><category term="Python Flask" /><category term="RESTful APIs" /><category term="MongoDB" /><category term="Horizontal Scalability" /><category term="Docker Compose" /><summary type="html"><![CDATA[Building and deploying fullstack web application today is different, compared to during the old times. Technologies has advanced further and allow us to keep our work standardise, simple, and faster. Following is the diagram of the architecture: Docker | Containerized Applications ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ │ │ '/' GET │ │ │ │ '/create' POST │ │ │ │ ┌───────────────────┐ │ │ │ │ │ │ ┌────►│ flask | backend-1 ├─────┐ │ │ │ │ │ │ │ │ │ └───────────────────┘ │ │ │ │ │ ┌────────────────────┐ │ ┌─────────┐ │ ┌────────────────────┐ ┌──────────────────────┐ │ │ │ │ │ │ │ │ │ ├────────►│ ├─────┘ ├───────►│ MongoDB | database │ │ │ Visitor ├─────┼─►│ reactjs | frontend │ │ nginx | loadbalancer │ │ │ │ │ │ │ │ │ │◄────────┤ ├─────┐ │ └────────────────────┘ │ └─────────┘ │ └────────────────────┘ └──────────────────────┘ │ ┌───────────────────┐ │ │ │ │ │ │ │ │ │ │ │ flask | backend-2 ├─────┘ │ │ └────►│ │ │ │ └───────────────────┘ │ │ │ │ '/update' PUT │ │ │ │ '/delete' DELETE │ │ │ └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ Made by Muazzam @ Hakase 26/06/2024 made possible at: asciiflow.com Based on the diagram above, there is one container for handling frontend, then forward the request to one load-balancer, and forward again the request to one of the backend, depends on the URL path. If the request are ‘/’ with GET method, and ‘/create’ with POST method, backend-1 container will process the request, while if the request are ‘/update’ with PUT method, and ‘/delete’ with DELETE method, backend-2 container will process the request. to be continue…]]></summary></entry><entry><title type="html">Welcome</title><link href="https://techlog.muazzam.my/2018/07/01/welcome.html" rel="alternate" type="text/html" title="Welcome" /><published>2018-07-01T00:00:00+08:00</published><updated>2018-07-01T00:00:00+08:00</updated><id>https://techlog.muazzam.my/2018/07/01/welcome</id><content type="html" xml:base="https://techlog.muazzam.my/2018/07/01/welcome.html"><![CDATA[<p>If you see this page, that means you have setup your site. enjoy! :ghost: :ghost: :ghost:</p>

<p>You may want to <a href="https://kitian616.github.io/jekyll-TeXt-theme/docs/en/configuration">config the site</a> or <a href="https://kitian616.github.io/jekyll-TeXt-theme/docs/en/writing-posts">writing a post</a> next. Please feel free to <a href="https://github.com/kitian616/jekyll-TeXt-theme/issues">create an issue</a> or <a href="mailto:kitian616@outlook.com">send me email</a> if you have any questions.</p>

<!--more-->

<hr />

<p>If you like TeXt, don’t forget to give me a star. :star2:</p>

<p><a href="https://github.com/kitian616/jekyll-TeXt-theme/"><img src="https://img.shields.io/github/stars/kitian616/jekyll-TeXt-theme.svg?label=Stars&amp;style=social" alt="Star This Project" /></a></p>]]></content><author><name>Muazzam</name></author><category term="TeXt" /><summary type="html"><![CDATA[If you see this page, that means you have setup your site. enjoy! :ghost: :ghost: :ghost: You may want to config the site or writing a post next. Please feel free to create an issue or send me email if you have any questions.]]></summary></entry><entry><title type="html">Post with Header Image</title><link href="https://techlog.muazzam.my/2018/06/01/header-image.html" rel="alternate" type="text/html" title="Post with Header Image" /><published>2018-06-01T00:00:00+08:00</published><updated>2018-06-01T00:00:00+08:00</updated><id>https://techlog.muazzam.my/2018/06/01/header-image</id><content type="html" xml:base="https://techlog.muazzam.my/2018/06/01/header-image.html"><![CDATA[<p>A Post with Header Image, See <a href="https://kitian616.github.io/jekyll-TeXt-theme/samples.html#page-layout">Page layout</a> for more examples.</p>

<!--more-->]]></content><author><name>Muazzam</name></author><category term="TeXt" /><summary type="html"><![CDATA[A Post with Header Image, See Page layout for more examples.]]></summary></entry></feed>