Coursera About Service Contains a description of the course, along with some strategic goals and possible outcomes of taking the course.
- Run
npm installfrom the root directory to install dependencies - From within the
databasedirectory, runcsvCreator.jsto generate 10 million records. - Seed a Cassandra database with
database/cassandra/cassandraFiller.js - Run
npm buildto build the webpack bundle - Run
npm server-devto start the server. Server runs on port 3002 - Run
npm run testto run the jest and Enzyme tests, CI/CD also enabled
/api/about/:idRequest
GET /api/about/:idResponse
Status: 200
Body:
{
"course_id": Number,
"description": String,
"what_you_will_learn": [
ArrayOfStrings
],
"skills_you_will_gain": [
ArrayOfStrings
],
"recent_views": Number,
"learner_career_outcomes": [
{
"icon": String,
"pct": Number,
"outcome": String
},
],
"metadata": [
{
"icon": String,
"title": String,
"subtitle": String
},
]
}Request
PUT /api/about/:id
Body:
{
"course_id": Number,
"description": String,
"what_you_will_learn": [
ArrayOfStrings
],
"skills_you_will_gain": [
ArrayOfStrings
],
"recent_views": Number,
"learner_career_outcomes": [
{
"icon": String,
"pct": Number,
"outcome": String
},
],
"metadata": [
{
"icon": String,
"title": String,
"subtitle": String
},
]
}Response
Status: 200
Body: Record AddedRequest
POST /api/about/:id
Body:
{
"recent_views": Number
}Response
Status: 200
Body: Record UpdatedRequest
DELETE /api/about/:idResponse
Status: 200
Body: Record Deleted- Using K6 I tested a Cassandra DB against a Postgres DB in local development
| Database | Requests | Total Requests | Latency (ms) | % Status Code 200 |
|---|---|---|---|---|
| Cassandra | 10,000 RPS | 600000 | 3420 | 87% |
| Postgres | 10,000 RPS | 60000 | 5026 | 79% |
| Cassandra | 1,000 RPS | 600000 | 52 | 99% |
| Postgres | 1,000 RPS | 60000 | 139 | 97% |
- Deployed 3 cassandra nodes and 3 EC2 Micro instances behind an NGINX load balancer
- Sustained 1,500 RPS to random routes at back 10% of db, tested wtih Loader.io
Google PageSpeed insight score of 99



