Coder Social home page Coder Social logo

uniwise / parrot Goto Github PK

View Code? Open in Web Editor NEW
3.0 12.0 0.0 260 KB

POEditor pull through cache

Home Page: http://uniwise.github.io/parrot

License: Apache License 2.0

Dockerfile 1.85% Go 93.22% Shell 0.16% Smarty 3.82% Groovy 0.95%
poedit cache go microservice poeditor translations i18n

parrot's Issues

Support multiple formats

Support multiple formats in the REST endpoint:

/v1/project/{project}/language/{language}/{format}

Support custom request id header name

We've settled on using x-trace-id as the header name for request ids. Echo does not allow easy configuration of this, so we probably have to write our own middleware

Improve healthcheck

Looks like the service might be throwing 504s for the first couple of seconds of running with a redis cache. Observed one, when rolling the production deployment. The log also hints that the cache is first ready after ~5 seconds of starting the service:

{"level":"info","msg":"Server listening at :80","time":"2021-03-25T09:58:36Z"}
{"level":"info","msg":"Prometheus metrics exposed at :9090/metrics","time":"2021-03-25T09:58:36Z"}
{"level":"info","msg":"sentinel: discovered new sentinel=\"747233771ef03c2613b4ffe2b00157407ca2063d\" for master=\"parrot\"","subsystem":"cache","time":"2021-03-25T09:58:42Z"}
{"level":"info","msg":"sentinel: discovered new sentinel=\"822a5febf7ca75fd42401b3bd12d80512e2701b1\" for master=\"parrot\"","subsystem":"cache","time":"2021-03-25T09:58:42Z"}
{"level":"info","msg":"sentinel: discovered new sentinel=\"b1e9b8d977ca27938692e926b2cce5640e87991e\" for master=\"parrot\"","subsystem":"cache","time":"2021-03-25T09:58:42Z"}
{"level":"info","msg":"sentinel: new master=\"parrot\" addr=\"10.100.77.76:6379\"","subsystem":"cache","time":"2021-03-25T09:58:42Z"}

I propose we include a service healthcheck in the /health endpoint to make sure the cache is ready for reads and writes before routing traffic to it

Support ETag in requests

Add ETag to rest requests to allow for better browser caching.

The ETag could be the MD5 sum of the file.

Add noCache header

Assessment frontend build pipeline fetches the terms each time. If we hit a bad cache time (i.e with new changes in POEditor), we would be safe if we could skip cache.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.