Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

added endpoint for a stack's request count (#221) #223

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

f-sander
Copy link

This PR addresses this issue #221:

In a Jenkins Pipeline, I want to block the deletion of a stack until it receives no more traffic. The usage of DNS weights for this is insufficient as callers might use long lived connections.

The metric I'm looking at is RequestCount for load balancers in AWS CloudWatch.

A new service lizzy.app.AWS is introduced here that wraps some functionality of boto3 for convenience. In particular, this service provides the following functionality:

  1. resolving a load balancer given a stack-id (if any)
  2. resolving the request count in the last n minutes of that load balancer
    Both, classic and application, load balancers are supported.

Further, a new endpoint is added /stacks/{stack-id}/request_count that first resolves the stack's load balancer and then returnes the request count of it. If the stack can not be found or the stack does not have a load balancer a 404 is returned.

@dmytro-vynokurov
Copy link

Nice

@jmcs
Copy link
Member

jmcs commented Feb 27, 2018

Hi. I think this would make more sense to implement this on senza and use senza here to get the values.

This way this functionality would also be available locally.

@f-sander
Copy link
Author

@jmcs I don't think there is not much demand for this functionality by senza users as people with access to AWS accounts have other options to obtain this information in a more informative way like the CloudWatch Console for instance.

How about adding a flag to senza delete like --ensure-no-requests that aborts the deletion if the stack receives traffic according to CloudWatch?

@jmcs
Copy link
Member

jmcs commented Feb 27, 2018

How about adding a flag to senza delete like --ensure-no-requests that aborts the deletion if the stack receives traffic according to CloudWatch?

This would be ok for me if it meets your requirements. I just don't want to add much logic to lizzy, it should remain a wrapper of senza and not much more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants