gdg-x / hub

[DEPRECATED] API Data Hub for the Global GDG Community
https://hub.gdgx.io
Apache License 2.0
36 stars 19 forks source link

update(server): Remove Redis, clustering. #113

Closed Splaktar closed 7 years ago

Splaktar commented 7 years ago

Convert session storage to Mongo. Enable Google Edge Caching for API. upgrade to latest Express and related libraries convert tasks to be triggered directly instead of via Redis+Clustering convert cron to call new tasks remove deprecated express-annotations remove API docs since they depended upon express-annotations convert rate metering to in-memory only since Redis is no longer an option temporarily disable CSRF protection

Closes #104.

Splaktar commented 7 years ago

@VikramTiwari Would appreciate it if you could take a quick look at this please.

VikramTiwari commented 7 years ago

@Splaktar Thanks for the invitation to project. Edge cache config looks fine. My question is if it's wise to cache everything for 1 hour? I would normally cache images for about a day and no cacheing on API requests. I think this works and we should enhance on top of this moving forward.

Splaktar commented 7 years ago

@VikramTiwari The setting in this location affects the API only. We do want to cache API requests to reduce the load on the servers and eliminate the need for running a separate Redis cluster (not cheap).

In express.js we're using etags and maxAge to do client side caching for 1 week via express.static(). I've updated the Cloud Endpoints branch to make this more clear.