Skip to content

Instantly share code, notes, and snippets.

View danvayn's full-sized avatar

Dan Vaynshteyn danvayn

View GitHub Profile
@danvayn
danvayn / EC2Proxy.md
Last active April 18, 2020 05:20 — forked from jake-dunnicliff/EC2Proxy.txt
Config/Results for EC2 Proxy Stress Test

Results from loader.io

Proxy GET Config

Client Requests per Second: 600 Duration: 1 min Method: GET Protocol: HTTP Host: http://3.88.40.243

@danvayn
danvayn / artillery config yml
Last active April 13, 2020 18:57
Artillery results for my proxy. Once again, the artillery section is not the final report because a final report can't be generated because when I test high loads, artillery forgets how to exit.
config:
target: 'http://localhost:3000'
# processor: "./helper.js"
phases:
- duration: 10
arrivalRate: 300
- duration: 10
arrivalRate: 600
- duration: 10
arrivalRate: 1200
@danvayn
danvayn / artillery makeRequests being run
Created April 13, 2020 00:54
artillery has trouble exiting and produces errors towards the end because the laptop I use to program on is old -- so I included full logs to show the number of high CPU warnings.
➜ load-balance-testing git:(master) ✗ artillery run makeRequests.yml
Started phase 0, duration: 10s @ 19:45:35(-0500) 2020-04-12
Report @ 19:45:45(-0500) 2020-04-12
Elapsed time: 10 seconds
Scenarios launched: 2998
Scenarios completed: 2669
Requests completed: 2669
Mean response/sec: 300.7
Response time (msec):
min: 0.8
@danvayn
danvayn / cassandra
Created April 10, 2020 03:05
Comparing query speeds between postgres and cassandra
cqlsh:reviews> cqlsh:reviews> SELECT * from reviews.reviews where appId = 10000;
id | appid | authoravatarurl | authorname | body | createdat | hasreply | likes | rating | replybody | replyname | updatedat
---------+-------+----------------------------------------------------------------------+--------------------+-------------------------
Executed (default): SELECT "id", "authorName", "authorAvatarUrl", "appId", "likes", "body", "rating", "hasReply", "replyName", "replyBody", "createdAt", "updatedAt" FROM "Reviews" AS "Review" WHERE "Review"."appId" = 51; Elapsed time: 16ms
[
{
id: 2287,
authorName: 'Blanche George',
authorAvatarUrl: 'https://www.gravatar.com/avatar/4b70b16785c41bd4bddba76e75531cf1.jpg',
appId: 51,
likes: 20,
body: 'Izajohzu tibbege emuviru ahru gunac vezodar nujivmiv amoror ten nac fur zos de fokleja ha ahuzes sid zetmud. Zekbo hema pom hij uja jok azguforu bi cu ce oczu le ve pavlip igbisa suzsaj. Vuzet jiig joze ima wulojew boijini zus lavnos tiesazaf abfiojo liddoto pe unicosli. Awavma bupad rerkivo getuta mo ho napaf senuvopa kir wunhep niok tumujdod ravmecag ok ruhrojem kacke sichicpi puv. Go vognumdic wiv zedagi nazit aveogji une loholiw hizi wajja ko hun iju bodzatbi.',
rating: 3.5,