These two debates meet in John 21 (though it is possible that talk in that chapter about the Beloved Disciple being the writer, verse 24, is only referring to this chapter which may be an epilogue to the gospel rather than a part of the whole gospel).
For the first and only time we have a reference to "the sons of Zebedee" (verse 2). And the Beloved Disciple (verse 20) is one of the seven disciples mentioned in verse 2. The seven disciples are:
Thomas called the Twin
Nathanael of Cana in Galilee,
the sons of Zebedee,
two others of [Jesus'] disciples.
Given that the Beloved Disciple is not Simon Peter (because Simon Peter asks Jesus a question about the Beloved Disciple) and unlikely to be Thomas or Nathanael (since there is no intrinsic reason why we wouldn't have the Gospel of Thomas or the Gospel of Nathanael if this were so), the Beloved Disciple is either James or John (sons of Zebedee) or one of the two unnamed disciples.
Christos Karakolis makes a point I have never previously thought of or heard of:
"It is striking that the three named disciples of 21:2 are the only disciples to have made a confession of faith referring directly to Jesus." [p. 666, see below for full bibliographical details]
Karakolis provides John 6:68-69 (Simon Peter's confession), 20:28 (Thomas' confession) and 1:49 (Nathanael's confession) as the texts supporting this claim.
There is another observation which Karakolis makes which I hadn't thought of or heard of before. When Peter says he is going fishing (21:3) and the others agree to follow him (within a gospel which has not previously informed readers of the fishing background to Simon Peter, Andrew and the sons of Zebedee),
"This information reveals in an indirect way that all disciples present, including the sons of Zebedee, share a fisherman's experience, although it is not clear whether this is their actual profession. Only thus can their spontaneous response be explained, a response in which everyone in the group immediately agrees to follow Peter in a nighttime fishing expedition on a rather unpredictable and dangerous lake. A man without fishing experience would not have followed so willingly." [p. 664].
That is, we can reasonably surmise two motivations re the names given in the list. On the one hand, the author says to us his readers, for this third and final resurrection appearance of Jesus, the three "confessors" were present (from a narrative perspective, a closing of a loop in the story). On the other hand (and assuming a bit of knowledge of the other gospels), that author tells us that at least three known fishermen were present in a group of people motivated to respond to a lead by Simon Peter to go fishing.
It is an odd way to finally but uniquely mention the sons of Zebedee who otherwise appear near the beginning of the other gospels. And even odder seems to be a lack of mention of Andrew, another known fisherman, whose prominence otherwise in the Gospel of John could lead us to reasonably presume that he was one of the seven.
What to make of this in respect of determining the name of the author of John's Gospel?
First, the reference to the sons of Zebedee need have nothing to do with the authorship. They are mentioned because they strengthen the idea that this particular group were not crazy or foolish to join Peter in his fishing expedition. Secondly, even if we surmise - for fishing reasons - that Andrew likely was one of the unnamed disciples (though puzzling as to why he is not thereby named), we are still left with one unnamed disciple who could be the Beloved Disciple and if the latter is the author then we do not have a name for the author.
Yet we have a gospel traditionally associated with one of those two sons of Zebedee. What does Karakolis say?
"The implied reader should identify the Beloved Disciple, who makes his appearance later on in the narrative of this chapter [ch. 21], with either one of the sons of Zebedee or with one of the two unnamed disciples of 21:2. However what seems like a riddle to the modern reader of the Gospel would probably have been obvious to the implied readers of the Gospel." [p. 669]
Karakolis then goes on to argue that because the Greek re the sons is, literally, "the [plural] of Zebedee" that the implied readers would have understood that this "meant the sons of Zebedee" and thus that we can safely conclude that "the implied readers knew the individual names of the sons of Zebedee" [p. 669]. Further,
"The Beloved Disciple is very close to Jesus and a person that is often compared to Peter and found to have superior faith and a closer relationship to Jesus than Peter has. From the perspective of the implied reader this person should therefore be a most significant apostle and not an unknown and insignificant character. From an historical point of view John of Zebedee was such a person." [p. 669]
Karakolis goes on to work through the pros and cons of the still possible identification of the Beloved Disciple with one of the two unnamed disciples and concludes,
"Although such an interpretation remains possible the odds are in favour of the identification of the Beloved Disciple with one of the sons of Zebedee." [p. 676].
Who wrote John's Gospel? We cannot rule out the possibility that it was John the son of Zebedee. But neither can we confirm it!
Christos Karakolis, "The Sons of Zebedee and Two Other Disciples: Two Pairs of Puzzling Acquaintances in the Johannine Denouement," in Hunt, Steve A., Tolmie, D. Francois and Zimmermann, Ruben (eds), Character Studies in the Fourth Gospel: Narrative Approaches to Seventy Figures in John (Grand Rapids, Michigan: Eerdmans, 2013, pp. 663-76.