Administrator – Chip-Carnival https://chip-carnival.com/ Stay current with us Wed, 03 Jul 2024 11:21:27 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.1 Why did Cloudflare Build its Own Reverse Proxy? – Pingora vs NGINX https://chip-carnival.com/why-did-cloudflare-build-its-own-reverse-proxy-pingora-vs-nginx/ https://chip-carnival.com/why-did-cloudflare-build-its-own-reverse-proxy-pingora-vs-nginx/#respond Wed, 03 Jul 2024 11:21:27 +0000 https://chip-carnival.com/?p=72375

Cloudflare is moving from NGINX to Pingora, it solves the primary reverse proxy and caching needs and even for web server’s request handling.

Image is subject to copyright!

NGINX as a reverse proxy has long been a popular choice for its efficiency and reliability. However, Cloudflare announced their decision to move away from NGINX to their homegrown open-source solution for reverse proxy, Pingora.

What is Reverse Proxy?

A reverse proxy sits in front of the origin servers and acts as an intermediary, receiving requests, processing them as needed, and then forwarding them to the appropriate server. It helps improve performance, security, and scalability for websites and web applications.

reverse-proxy

Imagine you want to visit a popular website like Wikipedia. Instead of going directly to Wikipedia’s servers, your request first goes to a reverse proxy server.

The reverse proxy acts like a middleman. It receives your request and forwards it to one of Wikipedia’s actual servers (the origin servers) that can handle the request.

When the Wikipedia server responds with the requested content (like a web page), the response goes back to the reverse proxy first. The reverse proxy can then do some additional processing on the content before sending it back to you.

What is the difference between Forward Proxy vs Reverse Proxy?

Understand, The role that proxies play in web architecture and consider using them to improve the performance, security, and scalability of your site.

Reverse Proxy is used for:Caching: The reverse proxy stores frequently requested content in its memory. So if someone else requests the same Wikipedia page, the reverse proxy can quickly serve it from the cache instead of going to the origin server again.Load balancing: If there are multiple Wikipedia servers, the reverse proxy can distribute incoming requests across them to balance the load and prevent any single server from getting overwhelmed.Security: The reverse proxy can protect the origin servers by filtering out malicious requests or attacks before they reach the servers.Compression: The reverse proxy can compress the content to make it smaller, reducing the amount of data that needs to be transferred to you.SSL/TLS termination: The reverse proxy can handle the encryption/decryption of traffic, offloading this work from the origin servers.Why Does Cloudflare Have a Problem with NGINX?

While NGINX has been a reliable workhorse for many years, Cloudflare encountered several architectural limitations that prompted it to seek an alternative solution. One of the main issues was NGINX’s process-based model. Each request was handled by a separate process, which led to inefficiencies in resource utilization and memory fragmentation.

Another challenge Cloudflare faced was the difficulty in sharing connection pools among worker processes in NGINX. Since each process had its isolated connection pool, Cloudflare found itself executing redundant SSL/TLS handshakes and connection establishments, leading to performance overhead.

Furthermore, Cloudflare struggled with adding new features and customizations to NGINX due to its codebase being written in C, a language known for its memory safety issues.

In-Memory Caching vs. In-Memory Data Store

In-memory caching and in-memory data storage are both techniques used to improve the performance of applications by storing frequently accessed data in memory. However, they differ in their approach and purpose.

How Cloudflare Built Its Reverse Proxy “Pingora” from Scratch?

Being Faced with these limitations, Cloudflare considered several options, including forking NGINX, migrating to a third-party proxy like Envoy, or building their solution from scratch. Ultimately, they chose the latter approach, aiming to create a more scalable and customizable proxy that could better meet their unique needs.

Feature
NGINX
Pingora

Architecture
Process-based
Multi-threaded

Connection Pooling
Isolated per process
Shared across threads

Customization
Limited by configuration
Extensive customization via APIs and callbacks

Language
C
Rust

Memory Safety
Prone to memory safety issues
Memory safety guarantees with Rust

To address the memory safety concerns, Cloudflare opted to use Rust, a systems programming language known for its memory safety guarantees and performance. Additionally, Pingora was designed with a multi-threaded architecture, offering advantages over NGINX’s multi-process model.

With the help of multi-threading, Pingora can efficiently share resources, such as connection pools, across multiple threads. This approach eliminates the need for redundant SSL/TLS handshakes and connection establishments, improving overall performance and reducing latency.

DevOps vs SRE vs Platform Engineering – Explained

At small companies, engineers often wear multiple hats, juggling a mix of responsibilities. Large companies have specialized teams with clearly defined roles in DevOps, SRE, and Platform Engineering.

The Advantages of Pingora

One of the main advantages of Pingora is its shared connection pooling capability. By allowing multiple threads to access a global connection pool, Pingora minimizes the need for establishing new connections to the backend servers, resulting in significant performance gains and reduced overhead.

Cloudflare also highlighted Pingora’s multi-threading architecture as a major benefit. Unlike NGINX’s process-based model, which can lead to resource contention and inefficiencies, Pingora’s threads can efficiently share resources and leverage techniques like work stealing to balance workloads dynamically.

Pingora: A Rust Framework for Network Services

Interestingly, Cloudflare has positioned Pingora as more than just a reverse proxy. They have open-sourced Pingora as a Rust framework for building programmable network services. This framework provides libraries and APIs for handling protocols like HTTP/1, HTTP/2, and gRPC, as well as load balancing, failover strategies, and security features like OpenSSL and BoringSSL integration.

The selling point of Pingora is its extensive customization capabilities. Users can leverage Pingora’s filters and callbacks to tailor how requests are processed, transformed, and forwarded. This level of customization is particularly appealing for services that require extensive modifications or unique features not typically found in traditional proxies.

The Impact on Service Meshes

As Pingora gains traction, it’s natural to wonder about its potential impact on existing service mesh solutions like Linkerd, Istio, and Envoy. These service meshes have established themselves as crucial components in modern microservices architectures, providing features like traffic management, observability, and security.

While Pingora may not directly compete with these service meshes in terms of their comprehensive feature sets, it could potentially disrupt the reverse proxy landscape. Service mesh adopters might consider leveraging Pingora’s customizable architecture and Rust-based foundation for building their custom proxies or integrating them into their existing service mesh solutions.

Monorepos vs Microrepos: Which is better?

Find out why companies choose Monorepos over Microrepos strategies and how they impact scalability, governance, and code quality.

The Possibility of a “Vanilla” Pingora Proxy

Given Pingora’s extensive customization capabilities, some speculate that a “vanilla” version of Pingora, pre-configured with common proxy settings, might emerge in the future. This could potentially appeal to users who desire an out-of-the-box solution while still benefiting from Pingora’s performance and security advantages.

]]>
https://chip-carnival.com/why-did-cloudflare-build-its-own-reverse-proxy-pingora-vs-nginx/feed/ 0
Setup Memos Note-Taking App with MySQL on Docker & S3 Storage https://chip-carnival.com/setup-memos-note-taking-app-with-mysql-on-docker-s3-storage/ https://chip-carnival.com/setup-memos-note-taking-app-with-mysql-on-docker-s3-storage/#respond Wed, 03 Jul 2024 10:12:00 +0000 https://chip-carnival.com/?p=72372

Self-host the open-source, privacy-focused note-taking app Memos using Docker with a MySQL database and integrate with S3 or Cloudflare R2 object storage.

Image is subject to copyright!

What is Memos?Memos Note Taking App

Memos is an open-source, privacy-first, and lightweight note-taking application service that allows you to easily capture and share your thoughts.

Memos features:Open-source and free foreverSelf-hosting with Docker in secondsPure text with Markdown supportCustomize and share notes effortlesslyRESTful API for third-party integrationSelf-Hosting Memos with Docker and MySQL Database

You can self-host Memos quickly using Docker Compose with a MySQL database.

Prerequisites: Docker and Docker Compose installed

You have two options to choose MySQL or MariaDB as a Database both are stable versions and MariaDB consumes less memory than MySQL.

Memos with MySQL 8.0version: “3.0”

services:

mysql:
image: mysql:8.0
environment:
TZ: Asia/Kolkata
MYSQL_ROOT_PASSWORD: memos
MYSQL_DATABASE: memos-db
MYSQL_USER: memos
MYSQL_PASSWORD: memos
volumes:
– mysql_data:/var/lib/mysql
healthcheck:
test: [“CMD”, “mysqladmin”, “ping”, “-h”, “localhost”]
timeout: 20s
retries: 10
restart: always

memos:
image: neosmemo/memos:stable
container_name: memos
environment:
MEMOS_DRIVER: mysql
MEMOS_DSN: memos:memos@tcp(mysql:3306)/memos-db
depends_on:
mysql:
condition: service_healthy
volumes:
– ~/.memos/:/var/opt/memos
ports:
– “5230:5230”
restart: always

volumes:
mysql_data:

Memos with MySQL Database Docker Compose

ORMemos with MariaDB 11.0version: “3.0”
services:
mariadb:
image: mariadb:11.0
environment:
TZ: Asia/Kolkata
MYSQL_ROOT_PASSWORD: memos
MYSQL_DATABASE: memos-db
MYSQL_USER: memos
MYSQL_PASSWORD: memos
volumes:
– mariadb_data:/var/lib/mysql
healthcheck:
test: [“CMD”, “healthcheck.sh”, “–connect”, “–innodb_initialized”]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
restart: always

memos:
image: neosmemo/memos:stable
container_name: memos
environment:
MEMOS_DRIVER: mysql
MEMOS_DSN: memos:memos@tcp(mariadb:3306)/memos-db
depends_on:
mariadb:
condition: service_healthy
volumes:
– ~/.memos/:/var/opt/memos
ports:
– “5230:5230”
restart: always

volumes:
mariadb_data:

Memos with MariaDB Database Docker Compose

Create a new file named docker-compose.yml and copy the above content.This sets up a MariaDB 11.0 database service and the Memos app linked to it.Run docker-compose up -d to start the services in detached mode.Memos will be available at http://localhost:5230.The configurations are:mysql service runs MySQL 8.0 with a database named memos-db.memos service runs the latest Memos images, and links to the mysql/mariadb service.MEMOS_DRIVER=mysql tells Memos to use the MySQL database driver.MEMOS_DSN contains the database connection details.The ~/.memos the directory is mounted for data persistence.

You can customize the MySQL password, database name, and other settings by updating the environment variables.

Kubernetes for Noobs

Kubernetes is an open-source system that helps with deploying, scaling, and managing containerized applications.

Configuring S3 Compatible Storage

Memos support integrating with S3-compatible object storage like Amazon S3, Cloudflare R2, DigitalOcean Spaces, etc

To use AWS S3/ Cloudflare’s R2 as object storageUse memos with external object storageSettings > StorageCreate a S3/Cloudflare R2 bucketGet the API token with object read/write permissionsIn Memos Admin Settings > Storage, create a new storageEnter details like Name, Endpoint, Region, Access Key, Secret Key, Bucket name and Public URL (For Cloudflare R2 set Region = auto)Save and select this storageconfigure memos with external S3 Object StorageFor Cloudflare R2 set Region = auto

With this setup, you can self-host the privacy-focused Memos note app using Docker Compose with a MySQL database, while integrating scalable S3 or R2 storage for persisting data.

13 Tips to Reduce Energy Costs on Your HomeLab Server

HomeLabs can be expensive when it comes to energy costs. It’s easy to accumulate multiple power-hungry servers, networking equipment, and computers.

How to Run Linux Docker Containers Natively on Mac with OrbStack?

Run Linux-based Docker containers natively on macOS with OrbStack’s lightning-fast performance, featherlight resource usage, and simplicity. Get the best Docker experience on Mac.

]]>
https://chip-carnival.com/setup-memos-note-taking-app-with-mysql-on-docker-s3-storage/feed/ 0
Mistral 7B vs. Mixtral 8x7B https://chip-carnival.com/mistral-7b-vs-mixtral-8x7b/ https://chip-carnival.com/mistral-7b-vs-mixtral-8x7b/#respond Wed, 03 Jul 2024 10:10:12 +0000 https://chip-carnival.com/?p=72369

Two LLMs, Mistral 7B and Mixtral 8x7B from Mistral AI, outperform other models like Llama and GPT-3 across benchmarks while providing faster inference and longer context handling capabilities.

Image is subject to copyright!

A French startup, Mistral AI has released two impressive large language models (LLMs) – Mistral 7B and Mixtral 8x7B. These models push the boundaries of performance and introduce a better architectural innovation aimed at optimizing inference speed and computational efficiency.

Mistral 7B: Small yet Mighty

Mistral 7B is a 7.3 billion parameter transformer model that punches above its weight class. Despite its relatively modest size, it outperforms the 13 billion parameters Llama 2 model across all benchmarks. It even surpasses the larger 34 billion parameter Llama 1 model on reasoning, mathematics, and code generation tasks.

Two foundations of Mistral 7B’s efficiency:

Grouped Query Attention (GQA) Sliding Window Attention (SWA)

GQA significantly accelerates inference speed and reduces memory requirements during decoding by sharing keys and values across multiple queries within each transformer layer.

SWA, on the other hand, enables the model to handle longer input sequences at a lower computational cost by introducing a configurable “attention window” that limits the number of tokens the model attends to at any given time.

Name
Number of parameters
Number of active parameters
Min. GPU RAM for inference (GB)

Mistral-7B-v0.2
7.3B
7.3B
16

Mistral-8X7B-v0.1
46.7B
12.9B
100

How Do (LLM) Large Language Models Work? Explained

A large language model (LLM) is an AI system trained on extensive text data, designed to produce human-like and intelligent responses.

Mixtral 8x7B: A Sparse Mixture-of-Experts Marvel

While Mistral 7B impresses with its efficiency and performance, Mistral AI took things to the next level with the release of Mixtral 8x7B, a 46.7 billion parameter sparse mixture-of-experts (MoE) model. Despite its massive size, Mixtral 8x7B leverages sparse activation, resulting in only 12.9 billion active parameters per token during inference.

LLM Bechmark GraphImage Credit: Mistral.ai

The key innovation behind Mixtral 8x7B is its MoE architecture. Within each transformer layer, the model has eight expert feed-forward networks (FFNs). For every token, a router mechanism selectively activates just two of these expert FFNs to process that token. This sparsity technique allows the model to harness a vast parameter count while controlling computational costs and latency.

According to Mistral AI’s benchmarks, Mixtral 8x7B outperforms or matches the large language models like Llama 2 70B and GPT-3.5 across most multiple tasks, including reasoning, mathematics, code generation, and multilingual benchmarks. Additionally, it provides 6x faster inference than Llama 2 70B, thanks to its sparse architecture.

Should You Use Open Source Large Language Models?

The benefits, risks, and considerations associated with using open-source LLMs, as well as the comparison with proprietary models.

Both Mistral 7B and Mixtral 8x7B are good at code generation tasks like HumanEval and MBPP, with Mixtral 8x7B having a slight edge and it’s better. Mixtral 8x7B also supports multiple languages, including English, French, German, Italian, and Spanish, making them valuable assets for multilingual applications.

On the MMLU benchmark, which evaluates a model’s reasoning and comprehension abilities, Mistral 7B performs equivalently to a hypothetical Llama 2 model over three times its size.

What is Vector Database and How does it work?

Vector databases are highly intriguing and offer numerous compelling applications, especially when it comes to providing extensive memory.

LLMs Benchmark Comparison Table

Model
Average MCQs
Reasoning
Python coding
Future Capabilities
Grade school math
Math Problems

Claude 3 Opus
84.83%
86.80%
95.40%
84.90%
86.80%
95.00%

Gemini 1.5 Pro
80.08%
81.90%
92.50%
71.90%
84%
91.70%

Gemini Ultra
79.52%
83.70%
87.80%
74.40%
83.60%
94.40%

GPT-4
79.45%
86.40%
95.30%
67%
83.10%
92%

Claude 3 Sonnet
76.55%
79.00%
89.00%
73.00%
82.90%
92.30%

Claude 3 Haiku
73.08%
75.20%
85.90%
75.90%
73.70%
88.90%

Gemini Pro
68.28%
71.80%
84.70%
67.70%
75%
77.90%

Palm 2-L
65.82%
78.40%
86.80%
37.60%
77.70%
80%

GPT-3.5
65.46%
70%
85.50%
48.10%
66.60%
57.10%

Mixtral 8x7B
59.79%
70.60%
84.40%
40.20%
60.76%
74.40%

Llama 2 – 70B
51.55%
69.90%
87%
30.50%
51.20%
56.80%

Gemma 7B
50.60%
64.30%
81.2%
32.3%
55.10%
46.40%

Falcon 180B
42.62%
70.60%
87.50%
35.40%
37.10%
19.60%

Llama 13B
37.63%
54.80%
80.7%
18.3%
39.40%
28.70%

Llama 7B
30.84%
45.30%
77.22%
12.8%
32.6%
14.6%

Grok 1

73.00%

63%

62.90%

Qwen 14B

66.30%

32%
53.40%
61.30%

Mistral Large

81.2%
89.2%
45.1%

81%

This model comparison table was last updated in March 2024. Source

When it comes to fine-tuning for specific use cases, Mistral AI provides “Instruct” versions of both models, which have been optimized through supervised fine-tuning and direct preference optimization (DPO) for careful instruction following.

👍

The Mixtral 8x7B Instruct model achieves an impressive score of 8.3 on the MT-Bench benchmark, making it one of the best open-source models for instruction.

Deployment and Accessibility

Mistral AI has made both Mistral 7B and Mixtral 8x7B available under the permissive Apache 2.0 license, allowing developers and researchers to use these models without restrictions. The weights for these models can be downloaded from Mistral AI’s CDN, and the company provides detailed instructions for running the models locally, on cloud platforms like AWS, GCP, and Azure, or through services like HuggingFace.

LLMs Cost and Context Window Comparison Table

Models
Context Window
Input Cost / 1M tokens
Output Cost / 1M tokens

Gemini 1.5 Pro
128K
N/A
N/A

Mistral Medium
32K
$2.7
$8.1

Claude 3 Opus
200K
$15.00
$75.00

GPT-4
8K
$30.00
$60.00

Mistral Small
16K
$2.00
$6.00

GPT-4 Turbo
128K
$10.00
$30.00

Claude 2.1
200K
$8.00
$24.00

Claude 2
100K
$8.00
$24.00

Mistral Large
32K
$8.00
$24.00

Claude Instant
100K
$0.80
$2.40

GPT-3.5 Turbo Instruct
4K
$1.50
$2.00

Claude 3 Sonnet
200K
$3.00
$15.00

GPT-4-32k
32K
$60.00
$120.00

GPT-3.5 Turbo
16K
$0.50
$1.50

Claude 3 Haiku
200K
$0.25
$1.25

Gemini Pro
32K
$0.125
$0.375

Grok 1
64K
N/A
N/A

This cost and context window comparison table was last updated in March 2024. Source

💡

Largest context window: Claude 3 (200K), GPT-4 Turbo (128K), Gemini Pro 1.5 (128K)

💲

Lowest input cost per 1M tokens: Gemini Pro ($0.125), Mistral Tiny ($0.15), GPT 3.5 Turbo ($0.5)

For those looking for a fully managed solution, Mistral AI offers access to these models through their platform, including a beta endpoint powered by Mixtral 8x7B.

DevOps vs SRE vs Platform Engineering – Explained

At small companies, engineers often wear multiple hats, juggling a mix of responsibilities. Large companies have specialized teams with clearly defined roles in DevOps, SRE, and Platform Engineering.

Conclusion

Mistral AI’s language models, Mistral 7B and Mixtral 8x7B, are truly innovative in terms of architectures, exceptional performance, and computational efficiency, these models are built to drive a wide range of applications, from code generation and multilingual tasks to reasoning and instruction.

How does the Groq’s LPU work?

Each year, language models double in size and capabilities. To keep up, we need new specialized hardware architectures built from the ground up for AI workloads.

]]>
https://chip-carnival.com/mistral-7b-vs-mixtral-8x7b/feed/ 0
Self-Host Open-Source Slash Link Shortener on Docker https://chip-carnival.com/self-host-open-source-slash-link-shortener-on-docker/ https://chip-carnival.com/self-host-open-source-slash-link-shortener-on-docker/#respond Wed, 03 Jul 2024 10:08:13 +0000 https://chip-carnival.com/?p=72366

Slash, the open-source link shortener. Create custom short links, organize them with tags, share them with your team, and track analytics while maintaining data privacy.

Image is subject to copyright!

Sharing links is an integral part of our daily online communication. However, dealing with long, complex URLs can be a hassle, making remembering and sharing links efficiently difficult.

What is Slash?Slash Link Shortener DashboardSlash Link Shortener Dashboard

Slash is an open-source, self-hosted link shortener that simplifies the managing and sharing of links. Slash allows you to create customizable, shortened URLs (called “shortcuts”) for any website or online resource. With Slash, you can say goodbye to the chaos of managing lengthy links and embrace a more organized and streamlined approach to sharing information online.

One of the great things about Slash is that it can be self-hosted using Docker. By self-hosting Slash, you have complete control over your data.

Features of Slash:Custom Shortcuts: Transform any URL into a concise, memorable shortcut for easy sharing and access.Tag Organization: Categorize your shortcuts using tags for efficient sorting and retrieval.Team Sharing: Collaborate by sharing shortcuts with your team members.Link Analytics: Track link traffic and sources to understand usage.Browser Extension: Access shortcuts directly from your browser’s address bar on Chrome & Firefox.Collections: Group related shortcuts into collections for better organization.

Deploying WordPress with MySQL, Redis, and NGINX on Docker

Set up WordPress with a MySQL database and Redis as an object cache on Docker with an NGINX Reverse Proxy for blazing-fast performance.

Prerequisites:

Method 1: Docker Run CLI

The docker run command is used to create and start a new Docker container. To deploy Slash, run:

docker run -d –name slash -p 5231:5231 -v ~/.slash/:/var/opt/slash yourselfhosted/slash:latest

Let’s break down what this command does:

docker run tells Docker to create and start a new container-d runs the container in detached mode (in the background)–name slash gives the container the name “slash” for easy reference-p 5231:5231 maps the container’s port 5231 to the host’s port 5231, allowing access to Slash from your browser-v ~/.slash/:/var/opt/slash creates a volume to store Slash’s persistent data on your host machineyourselfhosted/slash:latest specifies the Docker image to use (the latest version of Slash)

After running this command, your Slash instance will be accessible at http://your-server-ip:5231.

Method 2: Docker Compose

Docker Compose is a tool that simplifies defining and running multi-container Docker applications. It uses a YAML file to configure the application’s services.

Create a new file named docker-compose.yml and paste the contents of the Docker Compose file provided below.version: ‘3’

services:
slash:
image: yourselfhosted/slash:latest
container_name: slash
ports:
– 5231:5231
volumes:
– slash:/var/opt/slash
restart: unless-stopped

volumes:
slash:

docker-compose.yml

Start Slash using the Docker Compose command:docker compose up -d

This command will pull the required Docker images and start the Slash container in the background.

After running this command, your Slash container will be accessible at http://your-server-ip:5231

Slash is ready & allows you to create, manage, and share shortened URLs without relying on third-party services or compromising your data privacy.

Setup Memos Note-Taking App with MySQL on Docker & S3 Storage

Self-host the open-source, privacy-focused note-taking app Memos using Docker with a MySQL database and integrate with S3 or Cloudflare R2 object storage.

Benefits of Self-Hosting Slash Link Shortener

By self-hosting you gain several advantages:

Data Privacy: Keep your data and links secure within your infrastructure, ensuring complete control over your information.Customization: Tailor Slash to your specific needs, such as branding, integrations, or additional features.Cost-Effective: Eliminate recurring subscription fees associated with third-party link-shortening services.Scalability: Scale your Slash instance according to your requirements, ensuring optimal performance as your link management needs to grow.

Slash offers a seamless solution for managing and sharing links, empowering individuals and teams to streamline their digital workflows.

13 Tips to Reduce Energy Costs on Your HomeLab Server

HomeLabs can be expensive when it comes to energy costs. It’s easy to accumulate multiple power-hungry servers, networking equipment, and computers.

Shlink — The URL shortener

The self-hosted and PHP-based URL shortener application with CLI and REST interfaces

1.1 About | Blink

CircleCI

GitHub – SinTan1729/chhoto-url: A simple, lightning-fast, selfhosted URL shortener with no unnecessary features; written in Rust.

A simple, lightning-fast, selfhosted URL shortener with no unnecessary features; written in Rust. – SinTan1729/chhoto-url

GitHub – Easypanel-Community/easyshortener: A simple URL shortener created with Laravel 10

A simple URL shortener created with Laravel 10. Contribute to Easypanel-Community/easyshortener development by creating an account on GitHub.

GitHub – miawinter98/just-short-it: Just Short It (damnit)! The most KISS single-user URL shortener there is.

Just Short It (damnit)! The most KISS single-user URL shortener there is. – GitHub – miawinter98/just-short-it: Just Short It (damnit)! The most KISS single-user URL shortener there is.

liteshort

User-friendly, actually lightweight, and configurable URL shortener

GitHub – ldidry/lstu: Lightweight URL shortener. Read-only mirror of https://framagit.org/fiat-tux/hat-softwares/lstu

Lightweight URL shortener. Read-only mirror of https://framagit.org/fiat-tux/hat-softwares/lstu – ldidry/lstu

Lynx

The sleek, powerful URL shortener you’ve been looking for.

GitHub – hossainalhaidari/pastr: Minimal URL shortener and paste tool

Minimal URL shortener and paste tool. Contribute to hossainalhaidari/pastr development by creating an account on GitHub.

GitHub – azlux/Simple-URL-Shortener: url shortener written in php (with MySQL or SQLite) with history by users

url shortener written in php (with MySQL or SQLite) with history by users – azlux/Simple-URL-Shortener

Przemek Dragańczuk / simply-shorten · GitLab

GitLab.com

YOURLS | YOURLS

Your Own URL Shortener

]]>
https://chip-carnival.com/self-host-open-source-slash-link-shortener-on-docker/feed/ 0
Bare Metal Servers vs. Dedicated Host https://chip-carnival.com/bare-metal-servers-vs-dedicated-host/ https://chip-carnival.com/bare-metal-servers-vs-dedicated-host/#respond Wed, 03 Jul 2024 10:05:59 +0000 https://chip-carnival.com/?p=72363

Bare metal gives you total control over the hypervisor for maximum flexibility and resource optimization. Dedicated hosts keep things simple with the cloud provider managing the VMs for you.

Image is subject to copyright!

Let’s imagine you’re the owner of a fastest-growing e-commerce business. Your online store is getting more and more traffic every day, and you need to scale up your server infrastructure to handle the increased load. You’ve decided to move your operations to the cloud, but you’re unsure whether to go with bare metal servers or dedicated hosts. How does it impact your growth of business?

What are Bare Metal Servers & Dedicated Hosts, and what is the main difference?Bare Metal vs. Dedicated HostBare Metal vs. Dedicated Host

Both bare metal servers and dedicated hosts are physical machines located in a cloud provider’s data center. The main difference lies in who manages the hypervisor layer – the software that allows you to run multiple virtual machines (VMs) on a single physical server.

What is a Hypervisor and What Does It Do?

A hypervisor is a software layer that creates and runs virtual machines (VMs) on a physical host machine. It allows multiple operating systems to share the same hardware resources, such as CPU, memory, and storage. Each VM runs its own operating system and applications, isolated from the others, providing a secure and efficient way to run multiple workloads on a single physical server.

Types of Hypervisors Used in Cloud Data CentersType 1 (Bare-Metal) Type 2 (Hosted)Type 1 Hypervisor vs Type 2 Hypervisor LayerType 1 Hypervisor vs Type 2 Hypervisor

Type 1 (Bare-Metal) Hypervisors run directly on the host’s hardware, providing better performance and efficiency. Examples include VMware ESXi, Microsoft Hyper-V, and Citrix Hypervisor.

Type 2 (Hosted) Hypervisors run on top of a host operating system, like Windows or Linux. Examples include VMware Workstation, Oracle VirtualBox, and Parallels Desktop.

👍

Cloud providers often prefer Type 1 hypervisors for their data centers due to their superior performance and security.

Bare Metal vs Virtual Machines vs Containers: The Differences

When deploying a modern application stack, how do we decide which one to use? Bare Metal, VMs or Containers?

With a bare metal server, you’re essentially renting the entire physical machine from the cloud provider. However, you’re also responsible for installing and managing the hypervisor software yourself. This gives you a lot of control and flexibility. You can tweak the hypervisor settings to optimize performance, overcommit resources (like CPU and RAM) to squeeze more virtual machines onto the physical server, and have direct access to the hypervisor for monitoring, logging, and backing up your VMs.

🏠

Think of it like renting a house. You’re in charge of everything – from painting the walls to mowing the lawn. It’s a lot of work, but you get to customize the house to your exact preferences.

Feature
Bare Metal Server
Dedicated Host

Hardware
Physical server rented from cloud provider
Physical server rented from cloud provider

Hypervisor Management
Customer installs and manages the hypervisor software
Cloud provider installs and manages the hypervisor software

Hypervisor Control
Full control over hypervisor configuration settings
Limited or no control over hypervisor settings

Resource Allocation
Can overcommit CPU, RAM across VMs for efficiency
Limited ability to overcommit resources across VMs

Monitoring
Direct access to hypervisor for monitoring and logging
Rely on cloud provider’s monitoring tools

Backup/Recovery
Can backup VMs directly through hypervisor
Must use cloud provider’s backup/recovery services

Scalability
Scale VMs up/down based on available server resources
Request cloud provider to scale VMs up/down

Security
Responsible for securing the hypervisor layer
Cloud provider secures the hypervisor layer

Management Complexity
High, requires hypervisor expertise
Low, cloud provider handles hypervisor management

Pricing Model
Pay for entire physical server capacity
Pay for VM instances based on usage

Use Cases
High performance, legacy apps, regulatory compliance
General-purpose applications, simplified operations

Examples
IBM Cloud Bare Metal, AWS EC2 Bare Metal
IBM Cloud Dedicated Hosts, AWS Dedicated Hosts

Dedicated Hosts: Simplicity but Less Control

On the other hand, a dedicated host is like renting an apartment in a managed building. The cloud provider takes care of the hypervisor layer for you. All you have to do is tell them how many virtual machines you want, and they’ll set them up on the dedicated host for you. You don’t have to worry about managing the hypervisor or any of the underlying infrastructure.

The trade-off, of course, is that you have less control over the specifics. You can’t overcommit resources or tinker with the hypervisor settings. But for many businesses, the simplicity and convenience of a dedicated host are worth it.

How Companies Are Saving Millions by Migrating Away from AWS to Bare Metal Servers?

Many startups initially launch on AWS or other public clouds because it allows rapid scaling without upfront investments. But as these companies grow, the operating costs steadily rise.

Open-Source Hypervisor Alternatives

While cloud providers typically use proprietary hypervisors like VMware ESXi or Hyper-V, there are also free and open-source alternatives available, such as:

Proxmox Virtual Environment (Proxmox VE): A complete open-source server virtualization management solution that includes a KVM hypervisor and a web-based management interface.Kernel-based Virtual Machine (KVM): A type 1 hypervisor that’s part of the Linux kernel, providing virtualization capabilities without requiring proprietary software.Xen Project Hypervisor: An open-source type 1 hypervisor that supports a wide range of guest operating systems and virtualization use cases.Which Option is Right for Your E-commerce Business?

If you have a team of skilled system administrators who love getting their hands dirty with server configurations, and you need the flexibility to fine-tune your infrastructure for optimal performance, a bare metal server might be the way to go.

However, if you’d rather focus on your core business and leave the nitty-gritty server management to the experts, a dedicated host could be a better fit. It’s a more hands-off approach, allowing you to concentrate on building and scaling your e-commerce platform without worrying about the underlying infrastructure.

Should You Use Open Source Large Language Models?

The benefits, risks, and considerations associated with using open-source LLMs, as well as the comparison with proprietary models.

DevOps vs SRE vs Platform Engineering – Explained

At small companies, engineers often wear multiple hats, juggling a mix of responsibilities. Large companies have specialized teams with clearly defined roles in DevOps, SRE, and Platform Engineering.

]]>
https://chip-carnival.com/bare-metal-servers-vs-dedicated-host/feed/ 0
Is FaaS the Same as Serverless? https://chip-carnival.com/is-faas-the-same-as-serverless/ https://chip-carnival.com/is-faas-the-same-as-serverless/#respond Wed, 03 Jul 2024 10:03:15 +0000 https://chip-carnival.com/?p=72360

Suppose, as a small business owner, you’ve worked hard to build an e-commerce website that showcases your unique products. Your website is gaining traction, and you’re starting to see a steady increase in customer traffic. However, with this growth comes a new challenge – scalability.

Credit: Melody Onyeocha on Dribble

Whenever a customer clicks your site’s “Buy Now” button, your web application needs to process the order instantly, update the inventory, and send a confirmation email. But what happens when hundreds of customers start placing orders simultaneously? Your current server-based architecture simply can’t keep up, leading to slow response times, frustrated customers, and lost sales.

So you need a more scalable solution for your web application. This is where serverless computing comes in, allowing you to focus on code rather than infrastructure.

What is FaaS (Functions as a Service)?

Functions as a Service (FaaS) is a cloud computing service that allows you to run your code in response to specific events or requests, without the need to manage the underlying infrastructure. With FaaS, you simply write the individual functions (or “microservices”) that make up your application, and the cloud provider takes care of provisioning servers, scaling resources, and managing the runtime environment.

The benefits of FaaS:Pay-per-use: You only pay for the compute time when your functions are executed, rather than paying for always-on server capacity. Automatic scaling: The cloud provider automatically scales your functions up or down based on incoming traffic, ensuring your application can handle sudden spikes in demand. Focus on code: With the infrastructure management handled by the cloud provider, you can focus solely on writing the business logic for your application.

FaaS is specifically focused on building and running applications as a set of independent functions or microservices. Major cloud providers like AWS (Lambda), Microsoft Azure (Functions), and Google Cloud (Cloud Functions) offer FaaS platforms that allow developers to write and deploy individual functions without managing the underlying infrastructure.

How Companies Are Saving Millions by Migrating Away from AWS to Bare Metal Servers?

Many startups initially launch on AWS or other public clouds because it allows rapid scaling without upfront investments. But as these companies grow, the operating costs steadily rise.

What is Serverless?

Serverless is a broader cloud computing model that involves FaaS but also includes other fully managed services like databases (e.g., AWS DynamoDB, Azure Cosmos DB, Google Cloud Datastore), message queues (e.g., AWS SQS, Azure Service Bus, Google Cloud Pub/Sub), and storage (e.g., AWS S3, Azure Blob Storage, Google Cloud Storage).

In a serverless architecture, the cloud provider is responsible for provisioning, scaling, and managing the entire backend infrastructure required to run your application.

💡

FaaS is one type of serverless architecture, but there are other types, such as Backend-as-a-Service (BaaS).

The benefits of Serverless Computing:Reduced operational overhead: With no servers to manage, you can focus entirely on building your application without worrying about infrastructure. Event-driven architecture: Serverless applications are designed around event triggers, allowing you to react to user actions, data changes, or scheduled events in real time. Seamless scalability: Serverless platforms automatically scale your application’s resources up and down based on demand, with no additional configuration required on your part.

Monolithic vs Microservices Architecture

Monolithic architectures accelerate time-to-market, while Microservices are more suited for longer-term flexibility and maintainability at a substantial scale.

IT Infrastructure - IaaS, PaaS, FaaS

Feature
FaaS
Serverless

Infrastructure Management
Handles provisioning and scaling of servers/containers for your functions
Handles provisioning and scaling of the entire backend infrastructure, including servers, databases, message queues, etc.

Pricing Model
Pay-per-execution (cost per function invocation)
Pay-per-use (cost per resource consumption, e.g., CPU, memory, data transfer)

Scalability
Automatically scales functions up and down based on demand
Automatically scales the entire application infrastructure up and down based on demand

Stateful vs. Stateless
Functions are typically stateless
Supports both stateful and stateless services

Event-Driven Architecture
Supports event-driven execution of functions
Natively supports event-driven architecture with managed event services

Third-Party Service Integration
Integrates with other cloud services through API calls
Seamless integration with a rich ecosystem of managed cloud services

Development Focus
Concentrate on writing the application logic in the form of functions
Concentrate on building the overall application structure and leveraging managed services

Vendor Lock-in
Some vendor lock-in, as functions are typically tied to a specific FaaS platform
Potential for vendor lock-in, as Serverless often relies on a broader set of managed services

Examples
AWS Lambda, Azure Functions, Google Cloud Functions, IBM Cloud Functions
AWS (Lambda, API Gateway, DynamoDB), Azure (Functions, Cosmos DB, Event Grid), Google Cloud (Functions, Datastore, Pub/Sub), IBM Cloud (Functions, Object Storage, Databases)

Infrastructure Management
Handles provisioning and scaling of servers/containers for your functions
Handles provisioning and scaling of the entire backend infrastructure, including servers, databases, message queues, etc.

1. Scope

FaaS is a specific type of serverless architecture that is focused on building and running applications as a set of independent functions. Serverless computing, on the other hand, is a broader term that encompasses a range of cloud computing models, including FaaS, BaaS, and others.

2. Granularity

FaaS is a more fine-grained approach to building and running applications, as it allows developers to break down applications into smaller, independent functions. Serverless computing, on the other hand, can be used to build and run entire applications, not just individual functions.

3. Pricing

FaaS providers typically charge based on the number of function executions and the duration of those executions. Serverless computing providers, on the other hand, may charge based on a variety of factors, such as the number of API requests, the amount of data stored, and the number of users.

Monorepos vs Microrepos: Which is better?

Find out why companies choose Monorepos over Microrepos strategies and how they impact scalability, governance, and code quality.

Major cloud providers that offer FaaS and serverless computing services:AWS Lambda – AWS Lambda is a FaaS platform that allows developers to run code without provisioning or managing servers. Lambda supports a variety of programming languages, including Python, Node.js, Java, and C#.Azure Functions – Azure Functions is a serverless computing service that allows developers to build event-driven applications using a variety of programming languages, including C#, Java, JavaScript, and Python.Google Cloud Functions – Google Cloud Functions is a FaaS platform that allows developers to run code in response to specific events, such as changes to a Cloud Storage bucket or the creation of a Pub/Sub message.IBM Cloud Functions – IBM Cloud Functions is a serverless computing platform that allows developers to build and run event-driven applications using a variety of programming languages, including Node.js, Swift, and Java.Oracle Cloud Functions – Oracle Cloud Functions is a FaaS platform that allows developers to build and run serverless applications using a variety of programming languages, including Python, Node.js, and Java.Choosing Between FaaS and ServerlessUse FaaS for:Opt for serverless computing when:You’re deploying complex applications that require a unified environment for all components.You want to reduce the operational overhead of managing servers while maintaining control over application configurations.

AWS Lambda vs. Lambda@Edge: Which Serverless Service Should You Use?

Lambda is regional while Lambda@Edge runs globally at edge locations. Lambda integrates with more AWS services. Lambda@Edge works with CloudFront.

Understand with an Example

Suppose you want to build a simple web application that allows users to upload images and apply filters to them. With a traditional server-based architecture, you would need to provision and manage servers, install and configure software, and handle scaling and availability. This can be time-consuming and expensive, especially if you’re just starting out.

With a serverless architecture, on the other hand, you can focus on writing the code for the application logic, and let the cloud provider handle the rest.

For instance, you could use AWS Lambda (FaaS) to run the code that processes the uploaded images, AWS S3 for storage, and other AWS services like API Gateway and DynamoDB as part of the overall serverless architecture. The cloud provider would automatically scale the resources up or down based on demand, and you would only pay for the resources you actually use.

All FaaS is serverless, but not all serverless is FaaS.

FaaS is a type of serverless architecture, but the two terms are not the same. FaaS is all about creating and running applications as separate functions, while serverless computing is a wider term that covers different cloud computing models. In other words, FaaS is a specific way of doing serverless computing that involves breaking down an application into small, independent functions that can be run separately. Serverless computing, on the other hand, is a more general approach that can involve using different cloud services to build and run an application without having to manage servers.

The major cloud providers offer varying levels of tooling and community support for their FaaS and serverless offerings. AWS has the largest community and a mature set of tools like AWS SAM for local development and testing of serverless applications.

Microsoft Azure has good tooling integration with Visual Studio Code, while Google Cloud’s tooling is still catching up. A strong developer ecosystem and community support can be crucial when building and maintaining serverless applications.

FaaS Platform

Feature
Lambda
Azure Functions
Cloud Functions

Arm64 architecture
✅
❌
❌

Compiled binary deployment
✅
✅
❌

Wildcard SSL certificate free
✅
❌
✅

Serverless KV store
DynamoDB
CosmosDB
Datastore

Serverless SQL
Aurora Serverless
Azure SQL
BigQuery

IaC deployment templates
SAM, CloudFormation
ARM, Bicep
GDM

IaC drift detection
✅
❌
❌

Single shot stack deployment
✅
❌
❌

Developement

Feature
Lambda
Azure Functions
Cloud Functions

Virtualized local execution
✅
❌
❌

FaaS dev tools native for arm64
✅
❌
✅

Go SDK support
✅
✅
✅

PHP SDK support
✅
✅
✅

VSCode tooling
✅
✅
✅

Dev tools native for Apple Silicon
✅
❌
✅

Feature
Lambda
Azure Functions
Cloud Functions

Reddit community members
278,455
141,924
46,415

Stack Overflow members
256,700
216,100
54,300

Videos on YouTube channel
16,308
1,475
4,750

Twitter/X followers
2.2 M
1 M
533 K

GitHub stars for JS SDK
7.5 K
1.9 K
2.8 K

GitHub stars for .NET SDK
2 K
5 K
908

GitHub stars for Python SDK
8.7 K
2.7 K
4.6 K

GitHub stars for Go SDK
8.5 K
1.5 K
3.6 K

Runtimes

Runtime
Lambda
Azure Functions
Cloud Functions

Custom (Linux)
✅
✅
❌

Custom (Windows)
❌
✅
❌

Python
✅
✅
✅

Node.js
✅
✅
✅

PHP
❌
❌
✅

Ruby
✅
❌
✅

Java
✅
✅
✅

.NET
✅
✅
✅

Go
✅
✅
✅

Rust
✅
✅
❌

C/C++
✅
✅
❌

Serverless AI

Provider
Lambda
Azure Functions
Cloud Functions

Open AI
❌
✅
❌

Gemini
❌
❌
✅

Anthropic
✅
✅
✅

Meta Llama2
✅
✅
✅

Cohere
✅
✅
✅

AI21
✅
❌
❌

Amazon Titan
✅
❌
❌

Mistral
✅
✅
✅

Stability (SDXL)
✅
❌
✅

Computer Vision
✅
✅
✅

Bare Metal Servers vs. Dedicated Host

Bare metal gives you total control over the hypervisor for maximum flexibility and resource optimization. Dedicated hosts keep things simple with the cloud provider managing the VMs for you.

Ansible vs Terraform

Infrastructure automation and configuration management are two essential practices in modern IT operations, particularly in the DevOps & Cloud.

]]>
https://chip-carnival.com/is-faas-the-same-as-serverless/feed/ 0
Ubuntu Server 24.04 LTS vs 22.04 LTS https://chip-carnival.com/ubuntu-server-24-04-lts-vs-22-04-lts/ https://chip-carnival.com/ubuntu-server-24-04-lts-vs-22-04-lts/#respond Wed, 03 Jul 2024 10:02:35 +0000 https://chip-carnival.com/?p=72357

Explore the major upgrades, exciting new features, and enhancements in Ubuntu Server 24.04 LTS, including performance improvements, security updates, and extended support.

Image is subject to copyright!

Ubuntu has long been a favourite among developers and system administrators for its stability, security, and ease of use. With the release of Ubuntu Server Core 24.04 LTS (Noble Numbat), there are several exciting updates and improvements over its predecessor, Ubuntu Server Core 22.04 LTS (Jammy Jellyfish).

Let’s see what exciting changes this latest release brings to the table.

Linux Kernel and System Updates

First things first, Ubuntu 24.04 LTS comes with Linux kernel 6.8, which is a major upgrade over the 5.15 kernel used in 22.04 LTS. This new kernel promises better performance, improved hardware support, and stronger security measures.

😱

systemd has also been updated – from version 249 in Ubuntu Server 22.04 LTS to 255.4 in 24.04 LTS. This update will ensure smoother service management and faster boot performance.

Feature
Ubuntu 22.04 LTS
Ubuntu 24.04 LTS

Kernel Version
5.15
6.8

Performance
Standard
Enhanced

Hardware Support
Limited
Improved

Performance Engineering

Ubuntu 24.04 LTS brings several improvements to performance:

Performance tools are now pre-enabled and pre-loaded, allowing you to use them right away.Low-latency kernel features have been merged into the default kernel, reducing task scheduling delays.Frame pointers are enabled by default on 64-bit architectures, enabling accurate and complete flame graphs for performance engineers.bpftrace is now a standard tool alongside existing profiling utilities.

Feature
Ubuntu 22.04 LTS
Ubuntu 24.04 LTS

Performance Tools
Basic
Pre-enabled

Low-latency Kernel Features
No
Yes

Frame Pointers
No
Yes

bpftrace
No
Yes

Security Enhancements

Ubuntu 24.04 LTS takes security very seriously, and you’ll find significant improvements in this area:

Free security maintenance for the main repository has been extended to 5 years, with an option to add 5 more years and include the universe repository via Ubuntu Pro.A legacy support add-on is now available for organizations that require long-term stability beyond 10 years.

Security Feature
Ubuntu 22.04 LTS
Ubuntu 24.04 LTS

Free Security Maintenance
5 years
5 years + 5 optional

Legacy Support
No
Yes

Support Lifespan and Upgrades

Ubuntu 24.04 LTS comes with an extended support lifespan and improved upgrade options:

Support duration has been increased to 5 years, with the option to extend it further.Automatic upgrades will be offered to users of Ubuntu 23.10 and 22.04 LTS when 24.04.1 LTS is released.

Feature/Support
Ubuntu 22.04 LTS
Ubuntu 24.04 LTS

Support Duration
5 years (specific editions)
5 years + optional extension

Automatic Upgrades
No
Yes (for 23.10 and 22.04)

New Features and Package Updates

Ubuntu 24.04 LTS brings a few exciting new features and package updates:

Year 2038 support has been added for the armhf architecture.Linux kernel 6.8 and systemd v255.4 are the latest versions included.

New Feature
Ubuntu 22.04 LTS
Ubuntu 24.04 LTS

Year 2038 Support
No
Yes

Linux Kernel Version
5.15
6.8

Systemd Version
249
255.4

Application and Service Improvements

Several key applications and services have received updates in Ubuntu 24.04 LTS:

Nginx has been updated to version 1.24, offering better support for modern web protocols and improved performance.OpenLDAP has been upgraded to version 2.6.7, bringing bug fixes and enhancements.LXD is no longer pre-installed, reducing the initial footprint, but will be installed upon first use.Monitoring plugins have been updated to version 2.3.5, including multiple enhancements and new features for better system monitoring.

Service/Feature
Ubuntu 22.04 LTS
Ubuntu 24.04 LTS

Nginx
1.20
1.24

OpenLDAP
2.5
2.6.7

LXD
Pre-installed
Installed on use

Monitoring Plugins
2.3.2
2.3.5

Infrastructure and Deployment

Ubuntu 24.04 LTS also brings improvements to infrastructure and deployment:

The new Landscape web portal is built with Canonical’s Vanilla Framework, providing an improved API, better accessibility, and a new repository snapshot service.Enhanced management capabilities for snaps, supporting on-premises, mixed, and hybrid cloud environments.Currently Ubuntu Server 24.04 LTS offers:Improved hardware support and compatibility with linux kernel 6.8Performance enhancements and faster boot timesExtended 5-year support lifespan until June 2029Stronger security with 5+5 years of maintenance, legacy support add-onSeamless upgrade path from 23.10 and 22.04 LTSUpdated packages like NGINX, OpenLDAP, and monitoring pluginsThe decision to upgrade from 22.04 LTS should consider:New hardware/peripheral compatibility needsPerformance requirements for workloadsSecurity and compliance prioritiesSupport window and maintenance needsEase of upgrade and potential downtime

Also, Testing for stability and compatibility is crucial, especially for critical applications.

Ubuntu Release Notes:Ubuntu 24.04 LTS (Noble Numbat)Ubuntu 22.04 LTS (Jammy Jellyfish)

Is FaaS the Same as Serverless?

Are you confused about the difference between FaaS and serverless computing? All FaaS is serverless, but not all serverless is FaaS.

How Companies Are Saving Millions by Migrating Away from AWS to Bare Metal Servers?

Many startups initially launch on AWS or other public clouds because it allows rapid scaling without upfront investments. But as these companies grow, the operating costs steadily rise.

]]>
https://chip-carnival.com/ubuntu-server-24-04-lts-vs-22-04-lts/feed/ 0