Afi SV pfp

Afi SV

@afi

1077 Following
592 Followers


Afi SV pfp
Afi SV
@afi
Subscribe to my YouTube channel. I make videos on React, Remix & Software Development https://www.youtube.com/@afiiiiiiiiiii/videos
0 reply
0 recast
0 reaction

Afi SV pfp
Afi SV
@afi
0 reply
0 recast
0 reaction

Afi SV pfp
Afi SV
@afi
Did you know in your GithubAction You can use a container to run the steps in a job! eg: jobs: jobName: runs-on: ubuntu-latest container: cypress // docker contianer steps: - name: Run Update shell: bash run: apt-get update // bash command
0 reply
1 recast
1 reaction

Afi SV pfp
Afi SV
@afi
what gives you scale? Queue does. Its asynchronous processing. Offload heavy prorcess task from the main app flow. checkout BullMQ
2 replies
0 recast
0 reaction

Afi SV pfp
Afi SV
@afi
Weakness is your ally to find it, Load test your system before you put it into production. checkout https://Artillery.io
0 reply
0 recast
1 reaction

Afi SV pfp
Afi SV
@afi
Are you in the midst of vertical scaling? Use caprover to horizontal scale via docker swarm connect and deploy!
1 reply
0 recast
0 reaction

Afi SV pfp
Afi SV
@afi
Did you know in docker 🚒 Multistage builds is the go to way to build your docker image Image size is small thus security is vastly improved And build performance is faster with layer caching
1 reply
0 recast
2 reactions

Afi SV pfp
Afi SV
@afi
Did you know with Sentry's event fingerprinting you can group errors with greater granularity? If your quering an API service the stack trace is generally the same even if the outgoing request is very different Add it to your Sentry.init beforeSend function.
2 replies
0 recast
3 reactions

Afi SV pfp
Afi SV
@afi
Did you know Nginx has a Lua module? You can extend the functionality beyond what is available Things like: generate dynamic content on the fly handle HTTP requests with custom logic custom API gateways rate limiting, transofrm requests etc custom error handling and logging
1 reply
0 recast
3 reactions

Afi SV pfp
Afi SV
@afi
Your missing out on this Your production code stack trace should be readable, and see exaclty what code caused the error. Upload your sourcemaps to sentry right now!
2 replies
0 recast
2 reactions

Afi SV pfp
Afi SV
@afi
This is how you stop worrying about scaling. Vertical scale until you run out of resources Horizontal scale until you reach 20 - 50 machines Docker swarm until you think you cant handle manual auto scaling Kubernetes when your product hits 100M in revenue
1 reply
1 recast
2 reactions

Afi SV pfp
Afi SV
@afi
Here are 3 types of scan you didnt know about in postgres Sequential Scan Index Scan & Bitmap Heap Scan Use the EXPLAIN or EXPLAIN ANALYZE infront of your Query Outputs the type of scan, the planning time and the execution time
1 reply
0 recast
4 reactions

Afi SV pfp
Afi SV
@afi
Here is a lightning hack πŸ”₯ Preload data before the user even clicks a link Using prefetch="intent" <Link to="/some/path" prefetch="intent" /> from React Router⚑
0 reply
0 recast
1 reaction

Afi SV pfp
Afi SV
@afi
Do you wanna fake high web speed? Use stale-while-revalidate cache directive. It serves stale content while fetching fresh content in the background Users get instant responses while new data loads quietly! πŸ§™β€β™‚οΈ "Cache-Control": "public, max-age=60, stale-while-revalidate=300"
1 reply
0 recast
3 reactions

Afi SV pfp
Afi SV
@afi
0 reply
0 recast
2 reactions

Afi SV pfp
Afi SV
@afi
Subscribe to my YouTube channel. I make videos on DevOps, React and Software Development https://www.youtube.com/@afiiiiiiiiiii/videos
0 reply
1 recast
1 reaction

Afi SV pfp
Afi SV
@afi
You know about this recent headline right? Google deletes $135B pension fund customer's cloud account wal-g has a Failover archive storages experimental tho Dont forget! backup db in all the places, aws s3, digital ocean s3, black blaze s3 etc.. https://buff.ly/4cO5PtM
1 reply
0 recast
4 reactions

Afi SV pfp
Afi SV
@afi
Also I missed out. For point-in-time-recovery (PITR) you can use pg_basebackup You can take very fast consisten binary backups both for slaves/replicas
0 reply
0 recast
0 reaction

Afi SV pfp
Afi SV
@afi
There are different types of dumps for postgres pg_dump for a single database 1️⃣ pg_dumpall for entire clusters πŸŽ‡ And Point-in-time-recovery (PITR) as well wal files for continuous archiving 🧱
0 reply
0 recast
2 reactions

Afi SV pfp
Afi SV
@afi
Database backup showdown package: pgback_rest 🚻 all-in-one: pigsty.io 🐷 container: docker-db-backup 🚒 script: pg_capup.py πŸͺ£ dokku $: postgres:backup <service> <bucket-name> πŸ‘¨β€πŸ’» what are you using? Dont tell me you are paying to manage it are you?
1 reply
0 recast
1 reaction