Dev0ps
40 subscribers
211 photos
3 videos
50 files
3.33K links
Download Telegram
Кажется, я еще не писал про простой хак, как быстро сэкономить на AWS-счетах за траффик.

Траффик в Амазоне стоит дорого. Примерно $100 за терабайт. Если у вас, допустим, 100ТБ в месяц - это сразу $10к. Десять тысяч долларов. В месяц. Ну не суки?

Причем, 100ТБ - это вообще-то немного. Это плюс-минус обычный CRUD-SaaS с файл-аттачами. А уж если ваш стартап стримит видео или там хостит подкасты и клабхаусы - ох, боюсь даже подумать...

При этом у Амазона есть продукт "AWS Lightsail" - это такое, типа, облако для нубов. Панелька попроще, сервисов поменьше, цены потупее... Зато к серверу за $3.5 прилагается бесплатный траффик на 1 TB.

"$3.5 в месяц" vs "$100 в месяц"... Хммм, даже не знаю что выбрать....

Для тех, кто не понял:

- покупаем AWS Lightsail сервер(а)
- заводим nginx или haproxy
- профит

Траффик между Lightsail и "большим" AWS не тарифицируется. Но есть catch - в амазоновском TOS мелким шрифтом написано, что Lightsail нельзя использовать для прямого проксирования "больших" AWS-продуктов. Могут поймать и надавать по шее (хотя это маловероятно, знаю людей которые гоняют так траффик годами).

Поэтому вместо тупого реверс-прокси можно вынести туда фронтендовые микросервисы. Ну типа "микросервис по скачиванию файлов из S3", хихи. Юзер жмет ссылку "скачать файл" - мы не отдаем файл сразу, а редиректим на Lightsail со специальной магией в URL. А там уже крутится примитивный бекенд из трех строчек на node, который ходит в S3...

В общем, вариантов миллион. Дерзайте.
Forwarded from Dmitry [GMT-4] Tsybin
есть такая тулза: https://pre-commit.com/ (ну и на самом деле таких несколько, просто конкретно я с этой работал)
настраиваешь правила, коммитишь в репозиторий с кодом, дальше очень легко эти правила автоматически использовать локально и добавить в CI-пайплайн
Welcome to Nivio’s documentation! — Nivio documentation
https://nivio.readthedocs.io/en/master/
Forwarded from CatOps
The NGINX JavaScript module (njs) became generally available as a stable module in NGINX Open Source 1.11.10 and NGINX Plus R12.

With this module you can execute event-driven JS code on your Nginx edges. This article also contains a list of use cases for that. Among them:

- Response filtering
- Request body validation
- Masking the real client IP and other request parameters
- Issuing an HTTP request to two different backends simultaneously, then forwarding the first response and ignoring the second; adding data integrity to application cookies
- Progressively Transition Clients to a New Server

#nginx #web
Forwarded from CatOps
And back to IaC.

Pulumi has presented an Automation API - a generic way to programmatically trigger Pulumi execution.

This API should ease for platform teams the development of self-service developers' portals.

The article contains examples of the Automation API usage as a WebUI, CLI, CI/CD systems' plugin, and even Jupiter notebook.


#iac #pulumi
Forwarded from CatOps
Why sharing a single article if you can share the whole magazine?

Increment is an online and printed magazine about software and technologies, which is published in a good-old format of monthly issues.

Each issue has its own topic and the 16th dated February 2021 is dedicated to the topic of Reliability!

Enjoy more than 10 articles on reliability, chaos engineering, etc. as well as case studies from various companies. Also, you can buy a printed magazine version if you want.

Increment has already covered topics like On-call, Remote work, Cloud, etc. Honestly, this is the best publishing finding for me this year. I'll definitely dig into it and probably even order a printed version as well!

#reliability
Не совсем по теме канала, но это просто бомба 😍

askgit is a command-line tool for running SQL queries on git repositories. It's meant for ad-hoc querying of git repositories on disk through a common interface (SQL), as an alternative to patching together various shell commands. It can execute queries that look like:

-- how many commits have been authored by user@email.com?
SELECT count(*) FROM commits WHERE author_email = 'user@email.com'


-- Returns author emails with lines added/removed, ordered by total number of commits in the history (excluding merges):
SELECT count(DISTINCT commits.hash) AS commits, SUM(additions) AS additions, SUM(deletions) AS deletions, author_email
FROM commits LEFT JOIN stats('', commits.hash)
WHERE commits.parents < 2
GROUP BY author_email ORDER BY commits


…..

https://github.com/askgitdev/askgit