def _parse_redis_connection(connection):
    """
    Parse redis connection to host, db
    :param connection: redis connection
    :return: host, db
    """
    connection_kwargs = connection.connection_pool.connection_kwargs
    return (
        connection_kwargs.get('host', 'local'),
        connection_kwargs.get('port'),
        connection_kwargs.get('db', '0')
    )