Neighborhood is an implementation of Zillow's property view "Neighborhood" section from scratch. This project is an evolution of a legacy system that sought to replicate Zillow's Neighborhood component.
This application builds on the legacy project by introducing a number of improvements:
- 🚀 Transition from
SQLite
to a more robust and scalableMongoDB
database - 👍 Server and client enhancements to handle extreme bursts of concurrent requests
- Completely revamped client-side code that behaves well when positioned behind a load balancer such as
Nginx
- Implementation of an in-memory cache using the memory-cache node module
- Completely revamped client-side code that behaves well when positioned behind a load balancer such as
- Database server hosted on a single EC2 t2.micro
- 10 million
neighborhood
records
- 10 million
- Node.js component server hosted on 3 EC2 t2.micros load balanced with Nginx
- Each request is a
GET
request for a random API endpoint (a neighborhoods withid
between1
and10,000,000
)
- Making a get request to a single api endpoint that represents a neighborhood with a single
id
- Node v10.13.0 (LTS as of May 2019) or higher
- MongoDB for the database server
- Install dependencies with
npm install
- After connecting to the database, from the root directory run
npm run seedDatabase
- The main server file is
server/server.js
-- If nodemon is already installed globally (it is not part of the dependencies), you may start the server vianpm run server-dev
for development purposes ornpm start
for production -- The server uses port 3009 by default, but you may set it using an environment variableprocess.env.PORT
The client side is built using Webpack:
npm run dev
: Builds the client-side files in development mode and does not do full bundling. This also activates watch mode by default so it rebuilds whenever you make and save changes
npm run build
: Builds the client-side files in production mode, with full bundling. This reduces file size, but is less useful in debugging (some errors do not provide as much detail as in development mod