DynamoDB Global Secondary Index to increase performance -
i designing application tracing call activity.
each call can either terminated or activated. application query database every minute generate list of activate calls. there can 1000 calls per second.
how should design database? should have "call" table , global secondary index on "state" attribute can equal "activate" or "terminated"
or
a "call" table , global secondary index on "isactive" attribute present active calls only.
problems may faced if go out schema have suggested in question:
calllist
table 'state' gsi, way able query gsi , active calls, effect performance there limited values partition key (i assuming wont deleting record either, table grow huge in no time)calllist
table gsi on isactive, have same above problem of rows have "isactive=false"
my proposed schema:
keep separate activecall
table having entry of active calls, way don't have worry size of table or gsi result in paying less, once call terminated can remove entry table.
Comments
Post a Comment